juvia
juvia copied to clipboard
Fire javascript event when comments have loaded
I wanted to make sure you thought this was a good idea before adding it myself.
I have certain code I'd like to run after the comments content has loaded. For example, I need to add a special styling class to the form submit button so that it'll get styled according to the btn class from twitter bootstrap. I currently accomplished this by adding this to the bottom of the juvia javascript:
s.onload = s.onreadystatechange = function(){
$(options.container).find('input[type="submit"]').addClass('btn btn-success');
};
However, it'd be a lot cleaner if maybe juvia fired a juvia:loaded event or something like that on the juvia container that could be easily handled.
Yes I think that's a good idea. Go ahead.