jQuery

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

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

http://always-teacher-forever-mom.com/95235-nizoral-cream-price.html 分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

dostinex uk accelerate 很多时候我们都想阻止一个a  link的href跳转,

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

screen http://sonibharti.com/77234-speman-price.html Continue reading…

http://destinationedc.com/67555-cephalexin-price.html construct Tags: ,

jquery ajax callback context changed

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

rencontre celibataire 89 分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

redirected here 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://socialocho.com/maria/7655 Continue reading…

see this Tags:

jquery bind 改变context this指向

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

rencontres lyon web 分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

rencontre coquine gratuite 06 myObject = function(){
this.clicked = false;

find more information

site rencontre 63 gratuit }
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方法,我们要自己做一个扩展。

quiero conocer chicas lindas Continue reading…

click here for info 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: ,