I'm just starting wiht JQuery an dfound this script for a menu navigation that I like but the script is not formed well and I get an error with the $ at the beggining. Any help to make this right would be appreciated. The error is $is undefined. Can’t see to past the code in very well. Thanks
- <script type="text/javascript">
- $(function () {
- $('.dropdown').mouseenter(function () {
- $('.sublinks').stop(false, true).hide();
- var submenu = $(this).parent().next();
- submenu.css({
- position: 'absolute',
- top: $(this).offset().top + $(this).height() + 'px',
- left: $(this).offset().left + 'px',
- zIndex: 1000
- });
- submenu.stop().slideDown(300);
- submenu.mouseleave(function () {
- $(this).slideUp(300);
- });
- });
- });
- </script>