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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:50:36+00:00 2026-05-15T23:50:36+00:00

I have an icon inside a list, I’d like to just be able to

  • 0

I have an icon inside a list, I’d like to just be able to detect the double click on the icon – so I can delete the list, how is this possible (JQuery Sortable)

$("#roleList").dblclick(function(e) {
    var text = $(e.target).html();
    $(e.target).fadeOut('slow', function() {
        $("#deleteList").append(e.target);
    });
});


<ul id="roleList" class='droptrue'>
    <li class="ui-state-default" id="20~Role 1"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><input id="20" name="20" type="text" value="Director General" /></li>                                                                             
<li class="ui-state-default" id="1~Role 2"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><input id="1" name="1" type="text" value="Director" /></li>
</ul>

So I want to detect the click on the "ui-icon ui-icon-arrowthick-2-n-s" class so I can trigger a .fadeout and “delete” that list item.

I’m guessing if I can do that, this wont work:

var text = $(e.target).html();
$(e.target).fadeOut('slow', function() {
    $("#deleteList").append(e.target);
});

I’ll have to do a e.target.parent? Because I’d like to .fadeout the ENTIRE <li> and not just the icon.

Any help would be appreciated

  • 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-15T23:50:37+00:00Added an answer on May 15, 2026 at 11:50 pm

    You can try this one :

    $(".ui-icon").live("dblclick", function(){
      $(this).remove();
    });
    

    This will attach a double click event to any element with a class ui-icon which when executed will remove the element. If you want to delete the parent li element with a fade out:

    $(".ui-icon").live("dblclick", function(){
          $(this).parent('li:first').fadeOut('slow', function(){
            $(this).remove();
           });
     });
    

    I hope this is what you are looking for

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

Sidebar

Related Questions

I have drawn an icon in Inkscape , but would now like to programmatically
I would like to have a Java component which has a resize icon on
I have an list item with a button inside of it. The button is
I have a JLabel (actually, it is a JXLabel). I have put an icon
I have a simple Tray icon program that opens a site using System.Diagnostics.Process.Start(URL) And
I currently have a listview and I want to add an appropriate icon to
I have googled around and not seen any info. What format and icon color
I'm creating a WPF app and have a system tray icon with a context
Have just started using Google Chrome , and noticed in parts of our site,
I have ASP.NET MVC application that has list with jQuery Selectable list. My problem

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.