• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Jquery manipulation with previously jquery loaded data

#4
[eluser]skunkbad[/eluser]
[quote author="jmadsen" date="1349569528"]The issue you are having is because the image html is generated code, and so not bound to the jquery code

The easiest fix is to use .live('click', function(){...}) instead (or .on() is recommended now, but it isn't 100% the same)

http://api.jquery.com/live/[/quote]

.on() isn't quite the same, but should be used instead of .live() because you will end up making code that is instantly outdated if you use the deprecated .live() method.

See:
http://www.jquery4u.com/jquery-functions...HEFI1G4LTo
http://stackoverflow.com/questions/84777...ersus-live
http://www.andismith.com/blog/2011/11/on-and-off/
and a thousand more if you search on Google!

I always liked .live() because it was a instant swap for .bind(), but you gotta do what you gotta do. (unless you're using an old version of jQuery and then you don't gotta do what you can't do)


Messages In This Thread
Jquery manipulation with previously jquery loaded data - by El Forum - 10-06-2012, 09:58 AM
Jquery manipulation with previously jquery loaded data - by El Forum - 10-06-2012, 05:25 PM
Jquery manipulation with previously jquery loaded data - by El Forum - 10-06-2012, 06:50 PM
Jquery manipulation with previously jquery loaded data - by El Forum - 10-06-2012, 09:34 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.