1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

A jquery tooltip issue in iPad

Discussion in 'jQuery' started by qwikad.com, Feb 17, 2014.

  1. #1
    I use a jquery tooltip function for input fields. It works fine in laptops/desktops. However, the tooltip begins to offset when you scroll the page in iPad. If you don't scroll, the tooltip shows where it should. Once you scroll, the tooltip begins to show higher on the page.

    In the js file there's this line that is supposedly responsible for this bug:

    if(/iPad/i.test(navigator.userAgent))t.top=t.top-d(window).scrollTop()

    I tried different things to make it work, but nothing seems to be working.

    The tooltip is called out with this:

    
    
    <script>
      $(function() {
          $(".suggestions :input").tooltip({
          position: "center right",
          offset: [-2, 15],
          effect: "fade",
          opacity: 1.5
          });
        });
    </script>
    
    
    Code (markup):
    Is there a way to fix this?
     
    qwikad.com, Feb 17, 2014 IP
  2. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #2
    Have you tried just letting the tooltips behave natively by remove that code for iPads? And have you got a link to your site?
     
    HuggyStudios, Feb 18, 2014 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    My advice, stop pissing away your accessibility by using javascript to do LABEL's job. Much like that placeholder nonsense, it's NOT a proper replacement for LABEL.

    Seriously, why do people keep taking something simple (forms) and making them into inaccessible train wrecks of scripting JUST so they don't have to display a useful label?
     
    deathshadow, Mar 14, 2014 IP
  4. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #4
    You're probably right. I did figure it out though. I had to use a different option (still in jquery), but it's working in both PCs and iPads.
     
    qwikad.com, Mar 14, 2014 IP
  5. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #5
    This is where your age really shows through. Yes you are correct why do simple forms have so much extra code for a little qwerky feature. The answer is because this is what clients want developed to produce in their eyes a intuitive and intelligent user experience.

    Now days it's pretty much in every contract spec that I read. It doesn't mean it's right but the people that are PAYING you want it so they get it.
     
    HuggyStudios, Mar 16, 2014 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #6
    Then they need to see a ******* optometrist.

    I can't see most clients knowing enough to put that in a 'contrast spec' -- and if they did I would either try to EDUCATE them of the folly of it, or dismiss them as a ignorant halfwit who has no business even HAVING a website, then go find some other client.

    Admittedly this is probably a hefty part of why I've given up doing freelance work altogether. I just lack the tolerance to put up with the ignorant halfwit inaccessible buggy broken slow loading bullshit people sleaze out and have the giant brass monkey balls to call a 'website'; said sites being LESS useful than they were a decade ago. Yay, let's all just throw the past 15 years progress in the trash with script-tardery, "gee ain't it neat" PSD jockey BS, and letting ignorant fools who don't know enough about HTML, CSS, accessibility or even what a website IS dictate what they should be! Yeah, that's progress all right... (again, something else that reeks of the worst of 1997)
     
    deathshadow, Mar 16, 2014 IP
    HuggyStudios likes this.
  7. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #7
    I couldn't agree with you any more.
     
    HuggyStudios, Mar 17, 2014 IP