Hello all,

I am very new to JQuery and thought I'd go about teaching myself. I took three different codes I found online and combined them for my site.


I used:

accordion menu (http://www.i-marco.nl/weblog/jquery-accordion-3/)
a sliding menu and
coda-slider2.0 (http://www.ndoherty.biz/demos/coda-slider/2.0/#1)

The combined menu works great for my main navigation but the slider doesn't quite work. After doing a lot of problem solving, I discovered that the slider does not like my ul "menu" class in my navigation. If I remove the .menu from the ul... the slider works, but of course, my navigation no longer works.

Here is a snippet of code to help give a better idea of what i mean...

<div id="sidenav">
        <div id="navigation-block">
            <ul class="menu">
                <li>
                    <a href="#">Web</a>
                    <ul id="sliding-navigation" class="acitem">
                        <li class="sliding-element"><a class="xtrig" href="#1" rel="coda-slider-1">site 1</a></li>
                        <li class="sliding-element"><a class="xtrig" href="#2" rel="coda-slider-1">site 2</a></li>
                        <li class="sliding-element"><a class="xtrig" href="#3" rel="coda-slider-1">site 3</a></li>
                        <li class="sliding-element"><a class="xtrig" href="#4" rel="coda-slider-1">site 4</a></li>
                        <li class="sliding-element"><a class="xtrig" href="#5" rel="coda-slider-1">site 5</a></li>
                        <li class="sliding-element"><a class="xtrig" href="#6" rel="coda-slider-1">site 6</a></li>
                    </ul>
                </li>

So I tried everything and it is definitely not liking my "menu" class. I tried making it an id instead, no dice. I think it might have something to do with the fact that I needed to use the "xtring" class but I need it in order to call the slider externally.

So I don't clog this thread with code... here is the link to my site if it helps any more.
http://inspiredbynight.com/test/v6/

Any ideas anyone would have would be great!

Thank you so much in advance.

Gab

Recommended Answers

All 5 Replies

I'm wondering. I can't see a javascript reference to menu. Is class="menu" only used for css? If so, you could work around it i think.

The only place it is referenced in the js is in one of the files titled sidemenu.js

Here is the code:

$(document).ready(function() {$('.menu').initMenu();});

Thanks for the reply!!!

If you remove the class="menu" from the ul and use this line instead, does it make a difference ?

$(document).ready(function() { $('#navigation-block ul').initMenu(); });

Nope, no change. In messing around with the code some more I realize that the slider definitely does not like the accordion code. So somewhere in sidemenu.js it is conflicting with my slider javascript. When ever I disable the accordion effect, the slider works. So confusing :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.