如何通过元素';s不发生的事件';jQuery中还不存在
当我点击#按钮时,firebug告诉我jQuery.js中有东西在运行。如何实现这样的功能?获取缺少的函数的第二个参数如何通过元素';s不发生的事件';jQuery中还不存在,jquery,Jquery,当我点击#按钮时,firebug告诉我jQuery.js中有东西在运行。如何实现这样的功能?获取缺少的函数的第二个参数 // for example $('#text').die('focusout'); //then I try to make it live() with a button that just exist $('#button').live('click', function(){ $('#text').live('focusout'); }); 此处的选择器未定
// for example
$('#text').die('focusout');
//then I try to make it live() with a button that just exist
$('#button').live('click', function(){
$('#text').live('focusout');
});
此处的选择器未定义且失败。您需要将函数作为第二个参数传递给$('#text').live('focusout');没有回调参数,该行无论如何都没有任何功能 尝试以下方法:
function liveConvert( type, selector ) {
return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
}
您可以调用
$('#text').live('focusout',function(){/./})代码>只要您愿意,就假定jQuery已加载。在点击按钮时调用它对我来说没有意义。即使使用第二个参数,它也不起任何作用,脚本太复杂了。。无论如何,谢谢D
$('#text').live('focusout', function(){
//do logic here.
});