您的位置:首页 > Web前端 > JQuery

jquery ui 1.9.2+ 引起连接target失效问题

2014-01-11 15:21 381 查看
在使用jquery ui 1.9.2以上版本时,a标签的target失效了,不能让新连接页面到指定的iframe中,非常头疼。

经过1.9.1 与 1.10.2两版本比较,发现多了以下代码

e("<a>").data("a-b", "a").removeData("a-b").data("a-b")
&& (e.fn.removeData = function(t) {
return function(i) {
return arguments.length ? t.call(this, e.camelCase(i)) : t
.call(this)
}
}(e.fn.removeData)), e.ui.ie = !!/msie [\w.]+/
.exec(navigator.userAgent.toLowerCase()), e.support.selectstart = "onselectstart" in document
.createElement("div"), e.fn.extend({
disableSelection : function() {
return this.bind((e.support.selectstart
? "selectstart"
: "mousedown")
+ ".ui-disableSelection", function(e) {
e.preventDefault()
})
},
enableSelection : function() {
return this.unbind(".ui-disableSelection")
}
}),

于是果断删掉,结果就没事了。

但是比较蛋疼的是,看不懂这段代码是什么意思。。。。。。。(js真心灵活啊)

反正现在是没事了,先这么用着吧,不知哪位大牛若能指导下,万分感激!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: