Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire javascript event when comments have loaded #22

Open
JangoSteve opened this issue Feb 5, 2013 · 1 comment
Open

Fire javascript event when comments have loaded #22

JangoSteve opened this issue Feb 5, 2013 · 1 comment

Comments

@JangoSteve
Copy link
Collaborator

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.

@FooBarWidget
Copy link
Member

Yes I think that's a good idea. Go ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants