Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 113116

henrylemmon on "adding javascript and using javascript"

$
0
0

correct me if i am wrong:
I changed:

$(document).ready(function()
to
jQuery(document).ready(function($)

and I added the var below as a global to handle all the instances of the $ that was not insice of the document.ready function.

var $ = jQuery;

Is that what I am supposed to do? I know it works this way, it also works if I change all the $ to jQuery, but I did not think that was right, so let me know.
Thank you!
henrylemmon


Viewing all articles
Browse latest Browse all 113116

Latest Images

Trending Articles



Latest Images