this addresses issue somewhat, not entirely:
it's pretty elementary requirement -- want class' text color when element dynamically loaded. no problem there:
var follcolor = $('div.followup').css("color"); and when condition met, want update class color, references state of application i'm working on:
$('.anyclass').attr('style', 'color:'+follcolor+''); the problem variety of conditions can , occur change text's color dynamically after page loaded -- i'll never know which. want initial state can set user , have applicable without ever having follcolor variable reset.
the simplest solution somehow prevent var ever being updated after first time. suggested, there isn't event bind would, example, stop propagation/resetting. i'm stumped , can use here. in advance.
if understand question correctly try this. want if follcolor has value shouldn't change, instead of setting try this:
var follcolor; if(follcolor == null){ follcolor = $('div.followup').css("color"); } hope helps.
Comments
Post a Comment