Response title
This is preview!
Here it is in action - http://jsfiddle.net/jayblanchard/5j8aJ/4/
Here is where I got into a bit of confusion: it would seem to me that when you click once, causing the element to lose the smallImage class that any subsequent click would not work (and that your selector would have to be different) because you're clicking on an element that no longer has that class.
However, I understand that all selectors are performed at run-time, so those elements retain their characteristics. I would just like to understand the mechanics of this a little more so I have been looking at jQuery's source. Nothing has jumped out at me yet - can someone point me in the right direction?
Probably not many, but I can think of several instances where that will come in quite handy!Yes, indeed, you can define an actual named function and then pass it by name rather than defining them inline. I wonder how many jQuery developers realize this? ;)
© 2013 jQuery Foundation
Sponsored by and others.