Site Navigation

Jul 25, 2012

Multiple $(document).ready(function() with JQuery

JQuery LogoDid you know you can call JQuery's $(document).ready(function() multiple times? Well yes, you can according to the documentation.

I have playing with templating systems for both Abbey Workshop and Blue Sky Workshop. With those systems, I typically have some JQuery code in the header of the template. Consequently, that code is on every page. But what if you want to add some more JavaScript that does something completely different? Well no problem, just add to the content to the page and add a <script> tag wherever you want it. Pretty cool!
Post a Comment

Favorite Links Feed