小编Bhu*_*hah的帖子

从the_posts_pagination中删除h2中的screen_reader_text

我正在使用二十五主题和分页,我使用了the_posts_pagination并想要删除h2标签和文本

我试过但它只是删除"后导航"文本,而不是h2标签

the_posts_pagination( array(
  'prev_text'          => __( ' ', 'twentyfifteen' ),
  'next_text'          => __( ' ', 'twentyfifteen' ),
  'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( '', 'twentyfifteen' ) . ' </span>',//Page
  'screen_reader_text' => __( '&nbsp;' )
) );
Run Code Online (Sandbox Code Playgroud)

Pl帮助我.谢谢

php wordpress

9
推荐指数
1
解决办法
9403
查看次数

使用jquery ui嵌套拖放

将项目拖放到已删除的项目中

<table id='list1' >
</table>

<ul id="list2" >
</ul>

<table id='list3' >
<tr><td>test<ul style="min-height: 100px;border:1px solid red" class="drop-container"></ul></td></tr>
</table>
Run Code Online (Sandbox Code Playgroud)

我有以下代码

$( "#list3 li" ).draggable({
            connectToSortable: "#list2",
            helper: "clone",
            revert: "invalid"
});
$( "#list1 li" ).draggable({
        connectToSortable: "#list2",
        helper: "clone",
        revert: "invalid",
        greedy: true
});
Run Code Online (Sandbox Code Playgroud)

我如何直接将list1项目放入list2和list2的ul布局标签,它将通过拖放jquery的API来自list3?

小提琴:http://jsfiddle.net/bhumi/nkvzdwk9/1/

jquery jquery-ui

9
推荐指数
1
解决办法
2793
查看次数

PHP:从字符串末尾获取第n个字符

我确信必须有一种简单的方法来从字符串末尾获取第n个字符.

例如:

$NthChar = get_nth('Hello', 3); // will result in $NthChar='e'
Run Code Online (Sandbox Code Playgroud)

php string

8
推荐指数
1
解决办法
1万
查看次数

使用jQuery动画旋转单词

我想创建一个排版效果,并希望旋转一部分句子.我尝试过使用jQuery动画.

我想动画一下单词.这是我的代码

window.setInterval(function() {
  $("#tchange").animate({
    "top": "-=15px"
  }, 100).fadeOut("fast");
  $('#tchange').text("Xyz").css('top', '-10px').slideDown("slow");
}, 2000);
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h1 class="remove-bottom" style="margin-top: 40px">
        Get on the Current Release.<br>
        Boost your 
        <span id="tchange">
            Competitiveness
        </span>
    </h1>
Run Code Online (Sandbox Code Playgroud)

css jquery html5

7
推荐指数
1
解决办法
1946
查看次数

因为你有未合并的文件,所以无法使用Git pull

当我试图从git中取出时,低于错误

Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Run Code Online (Sandbox Code Playgroud)

我试图存储更改,但在存储拉不起作用后,请求合并.

如何在不提交/添加现有的情况下提取更改?

git

7
推荐指数
3
解决办法
3万
查看次数

如何使用JavaScript写入文件(用户目录)?

我想使用html5和javascript或jquery从chrome(所有版本)写入任何文件的txt.

我尝试过FileSystem API,我试过的代码是:

function onFs(fs) {
 console.log('test');
  fs.root.getFile('log.txt', {create: true, exclusive: true},
      function(fileEntry) {
        // fileEntry.isFile === true
        // fileEntry.name == 'log.txt'
        // fileEntry.fullPath == '/log.txt'

        fileEntry.getMetaData(function(md) {
          console.log(md.modificationTime.toDateString());
        }, onError);

      },
      onError
  );
}

window.webkitRequestFileSystem(TEMPORARY, 1024*1024 /*1MB*/, onFs);

但不行.

有没有办法写入文件?

javascript jquery html5

6
推荐指数
1
解决办法
7627
查看次数

jQuery UI丢弃问题

我使用jQuery UI开发了嵌套拖放,但它不允许我放弃.drop-container div.以下是要查看的代码段和JSFIDDLE:

$(function() {
    $("#list2 .drop-container").sortable({
        connectWith: "#list2 .drop-container",
        over: function() {
            removeIntent = false;
        },
        out: function() {
            removeIntent = true;
        },
        beforeStop: function(event, ui) {
            itemContext = ui.item.context;
            if (removeIntent == true) {
                ui.item.remove();
                disp($("#list2").sortable('toArray'));
            }
            //console.log(itemContext);

        },
        receive: function(event, ui) {
            console.log(ui);
            console.log(event);
            var this_id = $(ui.item).attr("id");
            var preview = $(itemContext).html().replace(/<!--/g, '').replace(/-->/g, '');

            $(itemContext).attr("id", this_id);
            $(itemContext).css("width", $('#list2').width() - 20).addClass("ui-state-default").height('auto');
            $(itemContext).html(preview);

            //console.log(this_id);
            //console.log(preview);

        }
    });
    $("#list2").sortable({
        connectWith: "#list2",
        over: function() {
            removeIntent = false;
        },
        out: function() …
Run Code Online (Sandbox Code Playgroud)

css jquery jquery-ui

6
推荐指数
1
解决办法
183
查看次数

如何在single.php上的上一个/下一个导航中使用特色图像

我在wordpress中使用二十五个主题.我想在single.php的post导航中添加精选图片

对于导航代码是

the_post_navigation( array(
      'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
          '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
          '<span class="post-title">%title</span>',
      'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
          '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
          '<span class="post-title">%title</span>',
  ) );
Run Code Online (Sandbox Code Playgroud)

如何在此代码中添加图像?

php wordpress

5
推荐指数
1
解决办法
3398
查看次数

如何设置 HTML5 表单验证消息的样式?

我正在使用“必需”的 HTML5 验证,但气泡消息正在我的屏幕中创建滚动条,因为输入字段尺寸很小并且位于右侧。

所以我想更改气泡消息以显示输入字段的左侧或更改其样式。

HTML5 表单

 <form>
  <input type="text" required value="" style="float:right"/>
  <input type="submit" value="Submit" />
</form>
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/bhumi/4ty922h9/

如何更改消息显示样式?

html

5
推荐指数
1
解决办法
8046
查看次数

PHP 函数 imagettftext() 用笑脸写文本

我正在使用 imagettftext 函数在图像上写入文本,但我的文本包含笑脸,它将笑脸替换为方框

这是我的代码:

$black = imagecolorallocate ( $main_img, 0x00, 0x00, 0x00 );
$font_path = "Arial.ttf";
imagettftext ( $main_img, 14, 0, 73, 685, $black, $font_path, $text );
Run Code Online (Sandbox Code Playgroud)

文本示例:

test testt Hello  Those   Mega x ??  Graphic 
Run Code Online (Sandbox Code Playgroud)

我曾尝试更改“Arial Unicode”字体,但未解决问题。

我该如何解决这个问题?

提前致谢。

php imagettftext emoji

5
推荐指数
2
解决办法
3762
查看次数

标签 统计

jquery ×4

php ×4

css ×2

html5 ×2

jquery-ui ×2

wordpress ×2

emoji ×1

git ×1

html ×1

imagettftext ×1

javascript ×1

string ×1