Sign in to follow this  
Followers 0

Javascript Jumping between <li>s


2 posts in this topic

Posted

I ripped some html source code from an old website in archive.org. The page I ripped has some javascript on it; it uses the jQuery library v1.4.2 and possibly a custom script created by this guy: http://remysharp.com/2009/01/26/element-in-view-event-plugin/

 

I don't know anything about javascript but I've included both files in the html document. Here is the html that uses javascript:

<div id="product-nav" class="column">

                    <h3>Product Bundle</h3>

                    <ul>

                        

                            <li class="active" rel="181"><a href="javascript:void(0)">Product 1</a></li>

                        

                            <li rel="88"><a href="javascript:void(0)">Product 2</a></li>

                        

                            <li rel="180"><a href="javascript:void(0)">Product 3</a></li>

                        

                            <li rel="85"><a href="javascript:void(0)">Product 4</a></li>

                        

                    </ul>

</div>

Those links are used in the left nav menu to switch between product displays:

<div id="products" class="column">

                <ul>

      

                        <li class="product" id="p181">

                            

                                <h3>Product 1</h3>



                        </li>       

                    

                        <li class="product" id="p88" style="display:none;">

                            

                                <h3>Product 2</h3>

                              

                        </li>

                    

                        <li class="product" id="p180" style="display:none;">

                            

                                <h3>Product 3</h3>

                               

                        </li>

                    

                        <li class="product" id="p85" style="display:none;">

                            

                                <h3>Product 4</h3>

                               

                        </li>

                    

                </ul>

When I click the 'Product 2' button in the nav menu, nothing happens. What do I need to do to get this javascript to work?

 

I can put the actual files online if it would help you understand what I'm trying to do. Just let me know.

Share this post


Link to post
Share on other sites

Posted

You really need to post the javascript that is associated with the list <li> tags.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.