Results 1 to 3 of 3

Thread: Page-wide Tooltip Setup

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    3

    Page-wide Tooltip Setup

    <a href="#" rel="tooltip" title="first tooltip">hover over me</a>

    Is it possible to use popovers without specifying every single element they should act on?

    In other words, tell the script to set up all of the <a>nchors on the page with the "popover" class to display their popover on hover?

  2. #2
    Junior Member
    Join Date
    Aug 2012
    Posts
    21
    You can do the following, this would convert links with rel=popover into popovers

    HTML Code:
    <a href="#" rel="popover" data-original-title="My Popover" data-content="This is my awesome popover!">Popover</a>
    
    <script type="text/javascript">
    $('a[rel=popover]').popover();
    </script>
    jsfiddle example @ http://jsfiddle.net/KSE3h/

  3. #3
    Junior Member
    Join Date
    Sep 2012
    Posts
    3
    Cool, thanks Shaun. I also got some help from some folks in the IRC channel who suggested a similar method.

    HTML Code:
    $('a.popover-test').popover({trigger:'hover'});

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •