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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:37:23+00:00 2026-06-08T09:37:23+00:00

strangely, I find it difficult to bind jquery’s onclick event handler to this fiddle.

  • 0

strangely, I find it difficult to bind jquery’s onclick event handler to this fiddle. I don’t even know what I’m doing wrong. The html is as follows:-

<ul>
    <li><a id="tooltip_1" href="#" class="tooltip" >Trigger1</a><li>
    <li><a id="tooltip_2" href="#" class="tooltip" >Trigger2</a><li>
    <li><a id="tooltip_3" href="#" class="tooltip" >Trigger3</a><li>
</ul>

<div style="display: none;">
    <div id="data_tooltip_1">
        data_tooltip_1: You can hover over and interacte with me
    </div>
    <div id="data_tooltip_2">
        data_tooltip_2: You can hover over and interacte with me
    </div>
    <div id="data_tooltip_3">
        data_tooltip_3: You can hover over and interacte with me
    </div>
</div>​

styled this way:-

li { 
    padding: 20px 0px 0px 20px;
}​

with a jquery like this:-

$(document).ready(function() {
    $('.tooltip[id^="tooltip_"]').each

        (function(){
        $(this).qtip({
            content: $('#data_' + $(this).attr('id')),
                show: {
            },
            hide: {
                fixed: true,
                delay: 180
            }
        });
    });
});​

you check out the fiddle page I created:- http://jsfiddle.net/UyZnb/339/.

Again, how do I implement a jquery modal-like appearance to it so the tooltip becomes the focus?

  • 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-08T09:37:27+00:00Added an answer on June 8, 2026 at 9:37 am

    Working Demo: using mouse over and out: http://jsfiddle.net/swxzp/ or using click http://jsfiddle.net/rjGeS/ ( I have written a small JQuery/ Css / Opacity demo)

    Update: Working sample with trigger 1, 2 & 3: http://jsfiddle.net/HeJqg/

    How it works:

    It has 2 divs i.e. background which is used to make rest page become grey-ish like modal and second div large which will act as a placeholder for the toolTip so thta you can close and open it in any event you want even though the background is grey.

    Rest feel free to play around with the code, hope it helps the cause :)

    Code

    $('.tooltip_display').click(function() {
        var $this = $(this);
        $("#background").css({
            "opacity": "0.3"
        }).fadeIn("slow");
    
    
        $("#large").html(function() {
            $('.ttip').css({
                left: $this.position() + '20px',
                top: $this.position() + '50px'
            }).show(500)
    
        }).fadeIn("slow");
    
    
    });
    
    $('.note').on('click', function() {
        $('.ttip').hide(500);
        $("#background").fadeOut("slow");
        $("#large").fadeOut("slow");
    
    });
    $("#large").click(function() {
        $(this).fadeOut();
    
    });​
    

    CSS

    .ttip {
        position: absolute;
        width: 350px;
        height: 100px;
        color: #fff;
        padding: 20px;
        -webkit-box-shadow: 0 1px 2px #303030;
        -moz-box-shadow: 0 1px 2px #303030;
        box-shadow: 0 1px 2px #303030;
        border-radius: 8px 8px 8px 8px;
        -moz-border-radius: 8px 8px 8px 8px;
        -webkit-border-radius: 8px 8px 8px 8px;
        -o-border-radius: 8px 8px 8px 8px;
        background-image:-moz-linear-gradient(top, #F45000, #FF8000);
        background-image: -webkit-gradient(linear, left top, left bottom, from(#F45000), to(#FF8000));
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F45000', endColorstr='#FF8000', GradientType=0);
        background-color:#000;
        display: none
    }
    .contents {
        font-size: 15px;
        font-weight:bold
    }
    .note {
        font-size: 13px;
        text-align:center;
        display:block;
        width: 100%
    }
    #background{
        display: none;
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
        background: #000000;
        z-index: 1;
    }
    #large {
        display: none;
        position: absolute;
        background: #FFFFFF;
        padding: 0px;
        z-index: 10;
        min-height: 0px;
        min-width: 0px;
        color: #336699;
    }​
    

    HTML

    <span class="tooltip_display">Trigger</span>
    <div id="large">
    <div class="ttip">
      <div class="contents">Here goes contents...</div>
      <span class="note">(click here to close the box)</span> 
    </div>
    </div>
    <div id="background"></div>​
    

    Image of working demo:

    enter code here

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

Sidebar

Related Questions

I've been trying to build this small java app. I find it very difficult
May be this question seems to be stupid, but strangely I find it hard
Strangely I couldn't find an existing question on this. I'm simply looking for a
I had a look around and (strangely) couldn't find this being asked before, so
Strangely I find no support for Midi in Android. The only thing that comes
I am using jQuery Accordion here and find some strange behavior when opening a
Strange, but I can't find a duplicate for this question. I have a superclass
I get a strange error and couldn't find the answer.. This code works well:
I am looking to find a clear explanation of what the "this" keyword does,
I am sure this will have been answered but I proved unable to find

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.