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

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -