Code for capturing an event on new or changed elements?

Kmandapalli
Posted by Kmandapalli under jQuery category on | Points: 40 | Views : 531
$('#' + id).append('<div style=&quot;text-align:center;width:300px;height:70px;background:url(/wp-content/uploads/2011/11/smashing-logo.jpg) no-repeat top center&quot;></div>');
$('#' + id + ' div').live('mouseenter', function (e) {
$(this).css( & amp; quot; background & amp; quot;, & amp; quot; url(/wp-content/uploads / 2011 / 11 / smashing - cat.png) no - repeat top center & amp; quot;);
}).live('mouseleave', function (e) {
$(this).css( & amp; quot; background & amp; quot;, & amp; quot; url(/wp-content/uploads / 2011 / 11 / smashing - logo.jpg) no - repeat top center & amp; quot;);
});

Comments or Responses

Login to post response