jQuery:
http://api.jquery.com/jQuery/#using-dom-elements
jQuery this DOM, . DOM, , #div1, #div2.
lonesomeday, jQuery , jQuery. $(this). : " DOM jQuery".
: this - . , :
$(function() {
$('#div1').click(function() {
var myThis1 = this;
$('.divs').each(function() {
var myThis2 = this;
});
});
});
myThis1will be the DOM object for #div1, but the .each()context changes inside your call this. myThis2on each cycle a DOM object will be set for some element with a class divs. Just something to pay attention to :)
Ender source
share