JQuery doesn't work on WordPress

jquery, wordpress

Solution

You must use `jQuery` keyword instead of `$` shortcut when you put JQuery in WordPress pages.. and eliminate new line characters and unnecessary spaces as well like shown below:

<script>jQuery(document).ready(function($){$('a[href="http://domain1"]').attr("href","domain2");});</script>

Problem

I'm trying to use JQuery in WordPress pages but it doesn't work: ``` <script> $('a[href="http://domain1"]').attr("href","http://domain2"); </script> ```

Original source