jQuery

由href return false 来看阻止默认事件

Posted by bower on February 09, 2012
javascript / 1 Comment

opcje binarne a forex 分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

http://www.cmtagency.com/?mikro=site-de-rencontre-chr%C3%A9tien-montr%C3%A9al&83c=04 很多时候我们都想阻止一个a  link的href跳转,

source <a onclick=”return false;” href=”www.360.cn”>click</a>

follow Continue reading…

follow url Tags: ,

jquery ajax callback context changed

Posted by bower on September 22, 2010
javascript / No Comments

follow 分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

between friends with benefits and dating the context in ajax call back is not the same one I pass in to it, at lease in IE its not, I think it just been cloned
since I got the problem in IE, and I debug it for 2 hours and find the problem.

http://metodosalargarpene.es/ebioer/1040 Continue reading…

follow url Tags:

jquery bind 改变context this指向

Posted by bower on September 18, 2010
javascript, / No Comments

Seroquel fedex shipping 分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

http://gerblhof.de/?frihya=monatliche-kosten-single&502=82 myObject = function(){
this.clicked = false;

rencontre recherche ruminant

}
myObject.prototype.click = function(e){
this.clicked = true;
var dom = e.target
}
var myOinstance = new myObject()
$('#myid').bind('click',myOinstance.click);

以上代码OO思想意图不会被实现 ,因为myOinstance.click中的this指向$(‘#myid’)的dom元素,而不是myOinstance
很可惜目前jquery不提供更改this指向或改变context的bind方法,我们要自己做一个扩展。

Continue reading…

Tags:

jQuery: Understanding the “chain”

Posted by bower on March 16, 2010
javascript / No Comments

分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

jQuery: Understanding the “chain”
Categories: Source Code, JavaScript, jQuery

Yesterday I was writing some jQuery code and I thought I came across a bug—until I realized it was a bug in my way of thinking and not with jQuery.

Continue reading…

Tags: ,