Wordpress use since version 2.5 the popular javascript framework JQuery. Still I see many blogs using fancy javascript effects loading a separate JQuery library to do the task. Why? Well I see three reason.
First people not always know that JQuery comes with wordpress and therefore think they have to upload JQuery core to use it.
Secondly there are people who know JQuery is there somewhere but can’t get their script working with it. And when they upload a normal version of JQuery everything is fine. That’s because the JQuery version used by wordpress is a special version to avoid conflict with other framework.
If you are familiar with javascript frameworks you know most of them use the $ as the core function. Know imagine you have two framework using this included. How you browser will know which one to call? The version of JQuery included in wordpress use “jQuery” instead of the $. So if you want to get an element by id you have to write it this way:
Hope that could help some, because it tooks me a while to figure it out.












Comments