I wrote a simple jquery function that loads on document ready. It should detect user agent. My site is a WordPress site. My script works in a standard HTML page but not in WordPress. Any ideas?
1 Answer
Turns out you had to replace the usual $() to jquery() in WordPress.
1 Comment
djt
That's right. Wordpress uses jQuery in 'no-conflict' mode in case another of your Javascript libraries also uses the
$ symbol. See here: learn.jquery.com/using-jquery-core/…
doesn't workmean? Does script get loaded? Does it throw errors? Not much detail here to work fromjQuery(document).ready(function($){--your script--});