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 });