I’m definitely NOT using another library for my WP installation and I’m loading lots of external js files that rely on the use of $. So I need to load jQuery WITHOUT the non-conflict mode.
I’ve seen 3 different ways:
a) deregistering present Jquery script and registering mine, (without the .noConflict() call in the last line)
b) using this code (but I can’t add all my js files there)
(function($) {
$(function() {
// more code using $ as alias to jQuery
});
})(jQuery);
c) just assigning
$ = jQuery
I’m not sure what the pros and cons are (I guess b method only works for in-line code, not for adding my own jquery based js files which expect $ to be available)
Please advice!
a) make sure your ‘own’ version is compatible with wordpress.
c) make sure this statement is executed before including other jquery lib (the ones which expect
$).a and c) I won’t do this for admin side