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 8783047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:43:44+00:00 2026-06-13T20:43:44+00:00

I have a page with a list and some thumbnails inside. The (simplified) html

  • 0

I have a page with a list and some thumbnails inside.
The (simplified) html of each li when the page loads:

<a class="img" href="http://exemple.com">
   <img src="http://exemple.jpg" onmouseover="startFlipBook(...);" onmouseout="endFlipBook(...);">
</a>

In that page, I have an “Edit” Button. When I click on that button, I load the jquery UI sortable plugin (so the user is able to sort the list). With javascript, I remove the mouseover and the mouseout on the images. I also disable the click on all a href. I do:

$("#edit").click(function() {
    $( "img" ).removeAttr('onmouseover').removeAttr('onmouseout');
    $( "a, .wrap" ).css('cursor','move');
    $( "a").click(function(){return false;});
});

So far, it’s working like I want (not sure it’s the best way of doing it though).

Now, in edit mode, I have a “Cancel” button. Hitting that button should put back the mouseover and the mouseout on the images, and the links need to work again.

This is where my code is not woking. I do :

$("#cancel").click(function() {
    //No idea how I can get back my initial mouseover and mouseout with the correct parameter        
    $( "a, .wrap" ).css('cursor','auto');
    $( "a" ).click(function(){return true;});
});

The links stay unclickable, the cursor is wrong and I don’t know how to put back my mouseover event.

Any help please?

  • 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-06-13T20:43:46+00:00Added an answer on June 13, 2026 at 8:43 pm

    You should clear the onmouseover and onmouseout attribute from all ‘a’ HTML element.

    <a class="img" href="http://example.com">
        <img src="http://example.jpg">
    </a>
    

    In the script you can use this sollution:

    $(document).ready(function(){
        // Add mouseenter and mouseleave event listener 
        $("a.img")
            .mouseenter(function(){ startFlipBook(...); })
            .mouseleave(function(){ endFlipBook(...); });
    
        // When click on Edit button
        $("#edit").click(function(){
    
            // Remove the mouseenter and mouseleave event listener
            $("a.img").unbind("mouseenter").unbind("mouseleave");
            $("a, .wrap").css('cursor','move');
            $("a").click(function(){return false;});
        });
    
        // When click on Cancel button
        $("#cancel").click(function() {
    
            // Add mouseenter and mouseleave event listener
            $("a.img")
                .mouseenter(function(){ startFlipBook(...); })
                .mouseleave(function(){ endFlipBook(...); });
            $( "a, .wrap" ).css('cursor','auto');
            // Remove the click event listener
            $( "a" ).unbind("click");
        });
    });
    

    You can read more about jQuery functions, what i wrote above:

    unbind : Remove an event listener
    mouseenter: Add an event listener, when mouse enters into an area
    mouseleave: Add an event listener, when mouse leaves an area

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a overview page containing a list with some links from which multiple
I have a dropdown select list on my page of class=TypeFilter. I have a
I have a page in JSP that list some file that could be downloaded
I've got a page with a list of some items. Each item has got
I have a page where I list hardware devices we monitor for customers. Each
I have a list of ten anchored thumbnails and some facts, and when you
I have a page with internal navigation. That means that I show some list
I have a page with two lists. The list on the left has some
Hi I have a page with a select list a follows <select class=othdebt id=othdebt
I have a page which list comments of users. My problem is that I

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.