What is the different between this (http://pastebin.com/PX0YB0hy) and (http://pastebin.com/VBqiMHVQ) for JQuery Masonry.
Why does the first one work and the second one doesn’t.
In both cases I used wp_enqueue_script to add the script.
Thanks!
What is the different between this (http://pastebin.com/PX0YB0hy) and (http://pastebin.com/VBqiMHVQ) for JQuery Masonry.
Why does the first one work and the second one doesn’t.
In both cases I used wp_enqueue_script to add the script.
Thanks!
You must be logged in to post a comment.
This executes, when the DOM has been constructed, before all content has been loaded
This executes, when all content has been loaded
This executes immediately, when it is first encountered by the browser
The latter is known as a self-executing anonymous function, which is very handy, but not here, because no content or not the right content may have been loaded when it self-executes.