Self Executing jQuery Plugin?

Posted by GnrlBzik on Stack Overflow See other posts from Stack Overflow or by GnrlBzik
Published on 2010-03-30T15:51:00Z Indexed on 2010/03/30 15:53 UTC
Read the original article Hit count: 229

Filed under:

I am working on expansion of my jQuery plug-in authoring knowledge, just playing around with my own ideas for learning benefits. So i was wondering how you guys tackle the need of plugin executing without any user specific input.

So I have a need for plug-in that executes right away after document is ready, without any user's specific input just as long as doc is loaded, so the only way I see how to execute plug-in on it's own is to attach handler to ready listener that executes my function which I extended the jQuery with. And because this needs to be self enclosed, part of the code, I attach handler to event listener within the function.

So how else could one tackle this? Any take at this is appreciated. Thank you in advance everyone.

© Stack Overflow or respective owner

Related posts about jquery-plugins