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

  • Home
  • SEARCH
  • 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 5969299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:12:36+00:00 2026-05-22T20:12:36+00:00

I wrote a plugin for jQuery but now my users are asking for the

  • 0

I wrote a plugin for jQuery but now my users are asking for the ability to run my plugin on various elements on the same page so I’m trying to rewrite it a bit.

I’m having issues with my events.

here is what was working.

$(".jTagLabels label").live('mouseenter',function(){
    $("#"+$(this).attr('rel')).css('opacity',1).find("span").show();
    $(".jTagDeleteTag").show();
});

Now I’m trying to register this event on specific context but It’s not working.

$(".jTagLabels label",container).live('mouseenter',function(){
    $("#"+$(this).attr('rel')).css('opacity',1).find("span").show();
    $(".jTagDeleteTag",container).show();
});

console.log(container) returns the right dom element…

It may be important to say that when I setup the event there is no jTagLabels created and that’s why I’m using the live() function…

  • 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-22T20:12:37+00:00Added an answer on May 22, 2026 at 8:12 pm

    Use delegate(), it’s a lot cleaner and that’s what it was made for, even though the resulting code could be the same.

    Also depending on your code context, your container variable is likely to lose its value between binding the event and triggering it.

    $(container).delegate(".jTagLabels label",'mouseenter',function(){
        var $this = $(this);
        $("#"+$this.attr('rel')).css('opacity',1).find("span").show();
    
        // There should be an easier way to find your container,
        // like .closest('.someclass')
        $this.parent().parent().find('.jTagDeleteTag').show();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a jQuery plugin that binds to 8 elements on a page, and
I wrote a simpe inline edit using jquery. The plugin work very well, but
I wrote a jQuery lightbox plugin, but I cannot figure out why the wrapper
I'm working with the jQuery Validation plugin and I wrote the following code which
I wrote the following (part of a jQuery plugin) to insert a set of
I've wrote a jQuery plugin for a project and it works perfectly in all
I'm having a little trouble with a jQuery plugin wrote. I've got it working
For a JQuery plugin that I am trying to write I would like to
I'm trying to create a visualized chart using Jquery Highcharts plug-in. But I'm unable
I wrote the following jQuery plugin that is basically just a simple notification system

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.