JQuery.js WordPress conflict -
JQuery.js WordPress conflict -
i have wordpress site uses jquery mega menu plugin , theme-my-login both call:
<script type='text/javascript'src='http://localhost/wadhaa/dynamic/wp-includes/js/jquery/jquery.js?ver=1.11.0'></script>
in head section by:
<?php /* have wp_head() before closing </head> * tag of theme, or break many plugins, * utilize hook add together elements <head> such * styles, scripts, , meta tags. */ wp_head(); ?>
and have include:
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
which causes conflicts wordpress jquery.js
can can help me prepare this? or allow me know @ to the lowest degree why conflict happen.
the error conflict is:
uncaught typeerror: undefined not function
you don't need include own jquery, wordpress have included it, $
name reserved.
just call:
jquery(function($) { $('#what_ever_you_want').do_something(); });
jquery wordpress
Comments
Post a Comment