Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6326055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:00:37+00:00 2026-05-24T17:00:37+00:00

I have a div with an unordered list inside that slides left when you

  • 0

I have a div with an unordered list inside that slides left when you click an LI item.

<div id="products">
<ul>
<li><a href="">Product 1</a></li>
<li><a href="">Product 2</a></li>
<li><a href="">Product 3</a></li>
</ul>

The problem is when you click a list item, the div slides left and as it slides under the mosue cursor, it triggers the rollover animations on all of the list items as they roll by.

Is there a way to disable javascript on items onclick?

I tried this:

$("#products li a").click(function(event){
event.preventDefault();
});
}

But that doesn’t seem to work as the animations still continue on the other list items on hover?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:00:38+00:00Added an answer on May 24, 2026 at 5:00 pm

    You can unbind the hover event from the list items when in your click event:

    $("#products li a").click(function(){
        $("#products").find('li').unbind('mouseenter');
    });
    

    This bit of code assumes that the you are binding to the mouseenter event (as opposed to the mouseover event).

    You can then re-apply the hover event handler to the list items after the animation completes if you want with a callback function in your animation call:

    $("#products").animate({left: '-=100px'}, function () {
        $("#products").find('li').bind('mouseenter', function () {
            //add hover code here
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basically have a fixed width DIV with an unordered list inside that overflows
I'm making a vertical unordered block list (inside a div), in which I have
I have unordered list inside a div. I use it to create buttons in
I have several div 's that contain a floated image and an unordered list.
I have an unordered list like this: <div class=blueBoxMid> <ul> <li>First item <em>This is
I have created an unordered list inside a div which is absolutely positioned. When
I have a DIV that contains an unordered list. I want to make a
I have an unordered list with several divs contained inside. Each list item is
I have a div with two nested divs inside, the (float:left) one is the
http://clifgriffin.com/blockade2/ Ok, I have an unordered list that serves as a list of menu

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.