$(“#request-brochure”).validate is not a function
This has got me baffled. I'm sure the solution is obvious, but I can't figure it out for the life of me.
All of the files are getting included correctly, and in the right order. I tried just removing the validation completely, just to see what would happen, and then started getting:
jQuery.easing[jQuery.easing.def] is not a function
...but only on this one page.
Can anyone offer any insights?
The page is at http://www.hotspring.co.nz/reques开发者_运维百科t-info/
You're loading two different versions of jQuery:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!--...-->
<script type='text/javascript' src='http://www.hotspring.co.nz/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
One of them ends up as $()
and doesn't have validate installed, the other ends up as jQuery()
and does have validate installed; in particular, $()
ends up as jQuery 1.5.2 and jQuery()
ends up as 1.4.4. Open up a JavaScript console on your site and look at these:
$.fn.jquery // This will say 1.5.2
jQuery.fn.jquery // This will say 1.4.4
The solution is to just include one jQuery library.
Are you sure nothing else is competing for the "$" object? A lot of toolkits use that and that can cause a lot of issues with jQuery and its plugins. Experiment with this and see if that helps you.
精彩评论