Avatar of jbrashear72
jbrashear72
 asked on

Jquery conflict

I have a page I am building that the client requires a menu with a j query effect.
the problem is that our portal also has to load a jQuery scrip lower in the document and this is causing the menu script not to function.
I was looking at the no conflict and tried adding it to the code but It doesn't seem to make a difference. the issue with the menu is that the drop down care hard to get to with the mouse and the transition is not working.

<script type="text/javascript">
    var dom = {};
dom.query = jQuery.noConflict(true);
</script>


The two conflicting lines seem to be:
Line 13:     <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
and
Line 82: <script type="text/javascript" src="/orms/resources/js/jquery-1.7.2.min.js"></script>

Here is the test page URL: http://dev.pds-austin.com/mustang/test3.asp

Any help would be awesome. Thanks.
jQueryCSSAJAX

Avatar of undefined
Last Comment
Kyle Hamilton

8/22/2022 - Mon
Kyle Hamilton

noconflict doesn't fix two calls to jquery. It resolves namespacing between libraries.

anyway, you need to get rid of one of the jquery calls. preferably the older one. keep the one on line 82.

If you can't remove the one that gets injected, then you can always just put your code below it. That way, you'll be using their jquery call. (put your script below line 82)
jbrashear72

ASKER
Well I can move the script down below the injected jquery but that does not work. jQuery has to load before the menu I am afraid. I tried loading the same jquery from line 82 to the header area but same issue. This is starting to pose a problem.
jbrashear72

ASKER
Here is the current test:
dev.pds-austin.com/mustang/test4.php
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Kyle Hamilton

the link goes to 404
jbrashear72

ASKER
Ahk!  sorr I do so much php I added a php extension.
http://dev.pds-austin.com/mustang/test4.asp
Kyle Hamilton

The menu works.

superfish() method is not defined - which is strange, because the superfish script is there...

What is the effect that is missing?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Kyle Hamilton

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jbrashear72

ASKER
If you notice the drop down does not allow your mouse to move to the sub menu. And the transition is not there too.
Kyle Hamilton

did you make the changes to the css?

post the most recent link with the changes from my post
jbrashear72

ASKER
ok Have made changes and the menus are dropped down when the page loads:
http://dev.pds-austin.com/mustang/test4.asp
Your help has saved me hundreds of hours of internet surfing.
fblack61
jbrashear72

ASKER
I think this was the answer:
<script language="javascript">
   $('.sf-menu ul').hide();
 $(function(){
$(".sf-menu > li").on({
  mouseenter : function(){
  $(this).find("ul").fadeIn('slow');
},
  mouseleave : function(){

   $(this).find("ul").fadeOut('slow');
}});

});
  </script>
Kyle Hamilton

you dont need to do it in javascript for that. just display:none in the css.
jbrashear72

ASKER
oh! Perfect! Thank you for all your help!
You where awesome.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
jbrashear72

ASKER
Thank you again.
Kyle Hamilton

cheers :)