pass jQuery(this) in ajax.load() -


i trying pass parameter ajax.load(). want pass this parent function ajax.load(). want use inside it

here code:

ajax.done(function(msg) {     jquery(this).children('p').append(msg);  }); 

you can define variable hold desired value in closure :

var $this = $(this); ajax.done(function(msg) {     $this.children('p').append(msg);  }); 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -