小编Nie*_*els的帖子

跳进jQuery宽度动画

我无法弄清楚为什么我的动画会跳跃.有任何想法吗?

http://jsfiddle.net/9F5DK/5/

jQuery(document).ready(function() {

// Animate the single page nav
    jQuery("a#post-nav-next").hover(

          function(){ 

            jQuery("a#post-nav-next span").stop(true, true).animate({width: "toggle", opacity: "toggle"});

        }
    );
});
Run Code Online (Sandbox Code Playgroud)

jquery animation padding toggle

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

获取类名末尾的数值并使用 jQuery 存储为变量

考虑 WordPress 函数的这个菜单输出:

<ul id="header-cats"> 

    <li class="cat-item cat-item-6"><a href="url" title="View all posts filed under Category I">Category I</a> 
</li> 
    <li class="cat-item cat-item-7"><a href="url" title="View all posts filed under Category II">Category II</a> 
</li> 
    <li class="cat-item cat-item-8"><a href="url" title="View all posts filed under Category III">Category III</a> 
</li> 

</ul> 
Run Code Online (Sandbox Code Playgroud)

现在考虑这个帖子列表:

<ul id="posts-preview" class="clearfix"> 

    <li class="filter-reset filter-hide filter-6 ">             
        <a class="post-thumb" id="post-112" href="url" >Link</a>        
    </li>

    <li class="filter-reset filter-hide filter-6 filter-8 ">            
        <a class="post-thumb" id="post-102" href="url" >Link</a>        
    </li>

    <li class="filter-reset filter-hide filter-7 ">             
        <a class="post-thumb" id="post-88" …
Run Code Online (Sandbox Code Playgroud)

jquery numerical class

2
推荐指数
1
解决办法
4371
查看次数

从电子邮件中删除无效字符

我想帮助用户在电子邮件输入中错误地输入无效字符(服务器端验证/清理前)

注意:我不在前端验证电子邮件,只是清理

// Coffeescript
$(Element).find('input[type="email"]').on 'change keyup', (event) ->
    I = $(this)
    V = I.val()
    I.val(V.replace( [what goes here?] , ''))
Run Code Online (Sandbox Code Playgroud)

我想删除空格和非法字符。

我的正则表达式模式是什么?

javascript regex email coffeescript

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