[jQuery] Re: syntax for $(response).$('a').each()

2008-12-18 Thread real
Try this instead: $('a', data).click(function(){ var href = $(this).attr('href'); [etc...] }); When using $('a', data).attr('onclick', 'javascript:your code goes here'); the 2nd parameter should be a string, as if you were doing foo On Dec 18, 12:55 pm, Namotco wrote: > Here is what I'm trying

[jQuery] Re: syntax for $(response).$('a').each()

2008-12-18 Thread Ricardo Tomasi
$ is a global object that calls find(), not a method of jQuery objects. Use the find() method directly: $(response).find('a').each(function(i){... - ricardo On Dec 18, 3:25 pm, Namotco wrote: > $('#divid').load(url, function( response ){ >     $(response).$('a').each(function(i){ >       // do

[jQuery] Re: syntax for $(response).$('a').each()

2008-12-18 Thread Namotco
Here is what I'm trying to do: $("#MTB").load(url +" #content", function(data) { $("a", data).attr("onclick",function (arr) { var href=this.attr('href'); if (h