buildlackey ha scritto:
$("div.disabled label").each (
function() {
alert("got a label" + this);
alert("got a label" + this.html()); // THIS FAILS.
});
Inside each "this" rappresents the html object and not a jquery or
javascript (not java! :-)) object.
If you want to use jquery methods inside the function you have to use
this code:
$("div.disabled label").each(function() {
alert("got a label (html object):" + this);
alert("got a label" + $(this).html()); //
THIS FAILS.
});
$(this) returns the jquery object of the html object this.
If you want to better explore your object use the console.log method (you have
to install firebug for firefox or companion.js for the internet explorer debug
bar).
bye
--
gianiaz.net - web solutions
via piedo, 58 - 23020 tresivio (so) - italy
+39 347 7196482