JQuery change background and keep it -
my jquery code looks this:
$(document).ready(function() { $('.french').click(function(){ changebackground(); }); }); function changebackground(){ $("#title").css('backgroundposition', '0px -120px' ); }
works beautifully 1 problem : after click background returns initial state. how can keep new background after click?
thanks ideas!
all working me thing can change this:
$(document).ready(function() { $('.french').click(changebackground); }); function changebackground(){ $("#title").css('backgroundposition', '0px -120px' ); }
here working example using jquery 1.5
Comments
Post a Comment