jquery code changes CSS but I want to fire a function instead -


i've got line of code waits #total increase 1 , changes css when happens.

$('#total_shares').html(parsefloat($('#total').html())+1).css({    //changes css of #total }); 

i'd know - if want retain same code instead of .css(); fire function instead have many more options rather changing css alone. possible?

thanks!

sure, use .each(), this:

$('#total_shares').html(parsefloat($('#total').html())+1).each(function() {    $(this).css({left: 50});//example css change    //changes css of #total }); 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -