大佬教程收集整理的这篇文章主要介绍了javascript – jQuery Dialog奇怪的错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<div id="divDialog"> </div>
$('#divDialog').dialog();
this.element[0].nodetitle is undefined
如果我删除div,错误消失.如果我只控制选择器部分,
它显示了firebug中的节点,一切看起来都很好.我目前正在通过以下方式扩展jquery:
$.fn.isAfter = function(sel){ //returns true if element is after,else return false,for animations return this.prevAll(sel).length > 0; } $.fn.isBefore= function(sel){ //returns true if element is before,for animations return this.nextAll(sel).length > 0; } $.fn.exists = function(){ //returns true if element exists,false if not return this.length>0; } $.fn.btnClick = function(fn){ //check if the element is disabled before execuTing onclick $(this).click(function(){ if($(this).attr('disabled')!='disabled'){ fn(this); } }); return $(this); } $.fn.btnToggle = function(){ //toggle disable/enable if($(this).attr('disabled')=='disabled'){ $(this).removeAttr('disabled'); } else{ $(this).attr('disabled','disabled'); } return $(this); }
我也在扩展Array原型:
Array.prototype.isArray = true; //this allows us to say if(variable.isArray) to detect arrays
有任何想法吗?我对此感到非常沮丧.任何帮助或方向将不胜感激.
以上是大佬教程为你收集整理的javascript – jQuery Dialog奇怪的错误全部内容,希望文章能够帮你解决javascript – jQuery Dialog奇怪的错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。