You must re-bind the click event to the classes every time you change it.
Use the newest live () method added in 1.3 version of jQuery library [1].
$(document).ready(function() {
$('.large').live("click", function(){
...
and
$(document).ready(function() {
$('.small').live("click", function
It's because you are expecting the 's events to change when you
add/remove the class... that certainly is *not* the case as your code
wires up the 's to their respective events one single time, on
document.ready
if you want to change the events on the fly, use the ".live"
version or better y
2 matches
Mail list logo