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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:17:44+00:00 2026-05-18T05:17:44+00:00

I found this great jquery bubble script online – http://jqueryfordesigners.com/coda-popup-bubbles/ – and I want

  • 0

I found this great jquery bubble script online – http://jqueryfordesigners.com/coda-popup-bubbles/ – and I want to apply the same script to multiple items. The only thing is the jquery script only applies to one item.

Here is the script:

$(function () {
    $('.bubbleInfo').each(function () {
        var distance = 10;
        var time = 250;
        var hideDelay = 500;

        var hideDelayTimer = null;

        var beingShown = false;
        var shown = false;
        var trigger = $('.trigger', this);
        var info = $('.popup', this).css('opacity', 0);


        $([trigger.get(0), info.get(0)]).mouseover(function () {
            if (hideDelayTimer) clearTimeout(hideDelayTimer);
            if (beingShown || shown) {
                // don't trigger the animation again
                return;
            } else {
                // reset position of info box
                beingShown = true;

                info.css({
                    top: 20,
                    left: 10,
                    display: 'block'
                }).animate({
                    top: '-=' + distance + 'px',
                    opacity: 1
                }, time, 'swing', function() {
                    beingShown = false;
                    shown = true;
                });
            }

            return false;
        }).mouseout(function () {
            if (hideDelayTimer) clearTimeout(hideDelayTimer);
            hideDelayTimer = setTimeout(function () {
                hideDelayTimer = null;
                info.animate({
                    top: '-=' + distance + 'px',
                    opacity: 0
                }, time, 'swing', function () {
                    shown = false;
                    info.css('display', 'none');
                });

            }, hideDelay);

            return false;
        });
    });
});

Here is the HTML:

<div class="bubbleInfo">
    <div>
        <img src="coda-bubble_files/nav-download.png" class="trigger">
    </div>
    <div class="popup">Content goes here</div>
</div>

What I would like to do is, dynamically populate a list of items with classes like “tigger1”, “trigger2”, “trigger3”, etc. Also “popup1”, “popup2”, etc. to use the script for multiple items but I don’t know how to go about changing or modifying the script.

Can anyone help and suggest a solution or an alternative?

Thanks!

  • 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-18T05:17:44+00:00Added an answer on May 18, 2026 at 5:17 am

    that function will apply to any element that has the bubbleInfo class, and remember elements can have multiple classes so

    <div id=div1 class="bubbleInfo divs"></div>
    
    <span id="span1" class="spans  "></span>
    
     <div class="popup bubbleInfo">Content goes here</div>
    

    will both have the action applied

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

Sidebar

Related Questions

Found this great article on using jquery for image swapping: http://jquery-howto.blogspot.com/2009/05/replacing-images-at-time-intervals.html How do you
I found a great jquery gallery. ( http://coffeescripter.com/2009/07/ad-gallery-a-jquery-gallery-plugin/ ) . I am trying to
I found this great Tablesorter plugin for jQuery but I can't make it work
I'm using the jQuery plugin corner: http://www.malsup.com/jquery/corner/ Its almost doing a great job making
In .Net, I found this great library, HtmlAgilityPack that allows you to easily parse
I found this open-source library that I want to use in my Java application.
I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/ , but there isn't a lot of description around
I found this: http://www.evolt.org/failover-database-connection-with-php-mysql and similar examples. But is there a better way? I
I found this via google: http://www.mvps.org/access/api/api0008.htm '******************** Code Start ************************** ' This code was
I found this solution for a case-insensitive jQuery :contains selector on StackOverflow. It works

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.