Javascript jqueryinternal不工作

Javascript jqueryinternal不工作,javascript,jquery,ajax,dom,internal,Javascript,Jquery,Ajax,Dom,Internal,这是我的javascript代码 $(this).find('a:internal:not(.no-ajaxy)').on('click',function(evt) { evt.preventDefault(); History.pushState(null, $(this).text(), $(this).attr('href')); }); 这就是我试图不应用ajax的链接 <a href="#loginModal" class="btn

这是我的javascript代码

$(this).find('a:internal:not(.no-ajaxy)').on('click',function(evt) {
        evt.preventDefault();
        History.pushState(null, $(this).text(), $(this).attr('href'));
    });
这就是我试图不应用ajax的链接

 <a href="#loginModal" class="btn btn-success no-ajaxy" data-toggle="modal">Login &rsaquo;&rsaquo;</a>

我目前正在使用jQuery v1.8.3

我认为您必须创建以下内容的自定义选择器副本:


从您的评论中,听起来您只需要使用以下内容:

$(this).find('a:not(.no-ajaxy)').on('click', function() {
     // your code...
});

:internal在jQuery中默认情况下不是可用的选择器。

没有:internal选择器,因此我不确定您在这里要做什么?我正在尝试选择类名$this中没有ajaxy的所有href标记。查找“a.no-ajaxy”。在。。。虽然你所说的你想要的与你的代码试图做的完全相反。如果类名是class=btn btns submit no ajaxy,那么这样做行吗?$这个。找到“a:不。no ajaxy”所有这些都在-的选择器部分,我建议你读一下。
jQuery.extend(  
  jQuery.expr[ ":" ],  
  {  
    /* 
      /:\/\// is simply looking for a protocol definition. 
      technically it would be better to check the domain 
      name of the link, but i always use relative links 
      for internal links. 
    */  

    external: function(obj, index, meta, stack)  
    {  
      return /:\/\//.test($(obj).attr("href"));  
    },  

    internal: function(obj, index, meta, stack)  
    {  
      return !/:\/\//.test($(obj).attr("href"));  
    }  
  }  
);  
$(this).find('a:not(.no-ajaxy)').on('click', function() {
     // your code...
});