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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:19:55+00:00 2026-06-08T03:19:55+00:00

>> JSFIDDLE << I think the title is self explanatory. I don’t know why

  • 0

>> JSFIDDLE <<

I think the title is self explanatory. I don’t know why this code is not working:

function toolTip() {
    var list = $("#readMoreUl");
    var links = list.children("li").children("a");
    var tooltips = links.children("span.tooltip");

    links.hover(function () {
        $(this).children("span.tooltip").fadeIn(350);
        },
    function () {
        $(this).children("span.tooltip").fadeOut(40);
        });    
}

$(document).ready(function () {
    $(window).resize(function() {
        if ($(window).width() > 480) {
            toolTip();
        }
    }).resize();
});

I also wondered: is my use of the last .resize call correct? Emulating an actual resize so the function gets called on window ready?

  • 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-08T03:19:56+00:00Added an answer on June 8, 2026 at 3:19 am

    For one, your code installs the tooltip handlers when the window is > 480 and every time that is detected, it installs it again (resulting in multiple event handlers). And, if the window is sized smaller than 480, it never removes the tooltip event handlers.

    I would suggest doing it this way which is much simpler:

    function toolTip() {
        var list = $("#readMoreUl");
        var links = list.children("li").children("a");
        var tooltips = links.children("span.tooltip");
        var overlay = $("#overlay");
    
        links.hover(function () {
            if ($(window).width() > 480) {
                $(this).addClass("highlight");
                $(this).children("span.tooltip").fadeIn(350);
                overlay.fadeIn(400);
            }
        },
        function () {
            $(this).children("span.tooltip").fadeOut(40);
            overlay.fadeOut(30);
            $(this).removeClass("highlight");
        });    
    }
    
    $(document).ready(function () {
        toolTip();
    });
    

    You can see it work here: http://jsfiddle.net/jfriend00/yVCwS/
    ​

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

Sidebar

Related Questions

jsfiddle is here: http://jsfiddle.net/M86nA/ code is this: $('div.wrap').click(function(){ var $minY = $('div.imgur-wrap').height(); if ($minY
JSFiddle URL: http://jsfiddle.net/sFe45/ Code: <html> <head> <title>Foo</title> <script type=text/javascript> var target; var anchor; function
Live Demo with visible code; http://jsfiddle.net/3eEgb/4/ The demo should be fairly self explanatory; I'm
Sorry for the title, I really couldn't think of how to simplify this problem.
I have this javascript code that creates a slider: http://jsfiddle.net/samccone/ZMkkd/ Now, i want to
I am using this code (much easier to illustrate in a Fiddle): http://jsfiddle.net/rECyh/ I
I have updated the code I am working on here http://jsfiddle.net/dFfJm/ At the first
jsFiddle The left red div will not go all the way down. I want
http://jsfiddle.net/CsrrD/ Given an object var viewModel = { Opts: ko.observableArray([ { d: 'a', v:
Sorry for the rather vague title, I couldn't think up a better description for

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.