Log in

View Full Version : DD Mega Menu Conflict With accordion



xsyam
08-23-2013, 05:44 PM
1) Script Title: DD Mega Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddmegamenu.htm

3) Describe problem: Like the post title, i add accordion on my page that have ddmegamenu script. the menu working well but not the accordion, but when i disable ddmegamenu the accordion works.


<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddmegamenu.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(e){
ddmegamenu.docinit({
menuid:'solidmenu',
dur:500,
easing:'easeInOutCirc' //<--no comma after last setting
})
});
</script>
<script>
jQuery(document).ready(function(){
$('.head').click(function(e){
e.preventDefault();
$(this).closest('li').find('.contentacc').slideToggle();
});
});
</script>

i have tried jQuery.noConflict(); still not work.

Please help.

Thanks in advance.

jscheuer1
08-23-2013, 05:54 PM
You might actually want to remove the noConflict() from inside the ddmegamenu.js script. Use a text only editor like NotePad to comment it out (addition red):


/* DD Mega Menu
* Created: June 13th, 2011 by DynamicDrive.com. This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/

// July 27th, 11': Added ability to activate menu via "click" of the mouse, on top of the default "mouseover".

//jQuery.noConflict()

jQuery.extend(jQuery.easing, { //see http

And do the same in accordion if it has a script and has that in it. Use only one version of jQuery for the page. What accordion script are you using? Or is that code in your post the whole thing?

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

xsyam
08-23-2013, 07:16 PM
Thank you very much jscheuer1,

Solved with only comment out the noConflict() on ddmegamenu.js