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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:53:42+00:00 2026-05-30T17:53:42+00:00

i am making a small tooltip feature for my site i had this working

  • 0

i am making a small tooltip feature for my site

i had this working perfectly: (on item hover check if exists the bubble and shows it. if not, makes a request, appends the buble and then show it)

$('.profileIcon').hover(function(){
    var u = $(this);
    var url = $(this).find('a').attr('href')+' #intro_usuario';

    if($(this).find('.nube').length>0){
        $(this).find('.nube').show();
    } else {
        //$('<div>').load(url).addClass('nube').css({'left':$(this).offset().left+$(this).outerWidth(true)+15,'top':$(this).offset().top}).appendTo(this).show();
        $('<div>').addClass('nube').addClass('nubeU').load(url,function(){
            $(this).css({'left':-20,'top':-16}).appendTo(u).show();
        });
    }
});

It would only make the request and append the toolip (.nube) div the first time users hover, next times will just show it (no request).

But onload more elements with ajax i’d had to recall it so i tought about using live

$('.profileIcon').live('hover',function(){
    var u = $(this);
    var url = $(this).find('a').attr('href')+' #intro_usuario';

    if($(this).find('.nube').length>0){
        $(this).find('.nube').show();
    } else {
       //$('<div>').load(url).addClass('nube').css({'left':$(this).offset().left+$(this).outerWidth(true)+15,'top':$(this).offset().top}).appendTo(this).show();
       $('<div>').addClass('nube').addClass('nubeU').appendTo(u).html($('#load').html()).load(url,function(){
           $(this) .css({'left':-20,'top':-16}).show();
       });
    }
});

the request is done every time and each time an extra bubble is appended

The question is:

¿ why did if($(this).find('.nube').length>0 stoped working using live?

  • 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-30T17:53:45+00:00Added an answer on May 30, 2026 at 5:53 pm

    i’d not waste my time on .live() and move on to the new replacement .on()

    .on() works like direct binding to an event, but also works like live. read the documentation for details on how to direct-bind and “bubble-bind”.

    try replacing your .live() with .on(), they should work normally.

    for direct binding (attach the handler to the element):

    element.on('event',function(){});
    

    for the “bubble-bind” (note that element is now the second parameter, and the parent is given the handler. child will be triggered, event will bubble up to the parent to handle the event)

    someParentElement.on('event','element',function(){});
    

    also, you need not worry who this is when using .on(), it will always be the element you triggered, be it direct or in bubble.

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

Sidebar

Related Questions

Hi im making a small site to help me and friends learn languages. Typical
im making a small site And Instead of having a header.php and a footer.php
I'm making a small peer-to-peer app that holds a common collection of objects. This
Im making a (small) site in php & mysql. The mysql database consists of
I'm making a small site where if you click on the background, you get
I am making this small and simple game with Java, and when I start
I am making small bubble words game where there will be many bubble(Imageview) on
We are making a small download site for software we create on AppEngine. We
I've been making small scale projects for a while now. I haven't started a
Im making a small python script to upload files on the net. The script

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.