Results 1 to 3 of 3

Thread: Re-writing a jQuery tooltip plugin

  1. #1
    Join Date
    Aug 2009
    Location
    utf-8
    Posts
    205
    Thanks
    4
    Thanked 7 Times in 7 Posts

    Default Re-writing a jQuery tooltip plugin

    In one of my projects im using this tooltip plugin called aToolTip [GitHub].

    It's great however I do not want to have to call the plugin by adding

    Code:
    class="fixedTip"
    to every single link in the page. It should be called using something like this:

    Code:
    <script>
    		$(function(){ 
    			$('document.body').aToolTip({
    		    		fixed: true
    			});
    		}); 
    </script>
    ....
    <a href="#" title="Hello, I am aToolTip">Normal Tooltip</a>
    Last edited by FrickenTrevor; 01-20-2015 at 02:44 AM.
    An inline div is a freak of the web and should be beaten until it becomes a span

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    This will apply the tooltip to all <a> tags that have a title attribute.
    Code:
    		<script type="text/javascript">
    			$(function(){ 
    				$('a').aToolTip({
    		    		fixed: true
    				});
    			}); 
    		</script>
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Aug 2009
    Location
    utf-8
    Posts
    205
    Thanks
    4
    Thanked 7 Times in 7 Posts

    Post

    Quote Originally Posted by Beverleyh View Post
    This will apply the tooltip to all <a> tags that have a title attribute.
    Code:
    		<script type="text/javascript">
    			$(function(){ 
    				$('a').aToolTip({
    		    		fixed: true
    				});
    			}); 
    		</script>
    You know I thought that it would be something this simple, and I do feel stupid for not thinking about changing it like that
    I am so used to plugins that are so hardcoded to where if you change one little thing the entire plugin breaks.
    An inline div is a freak of the web and should be beaten until it becomes a span

Similar Threads

  1. Resolved Help With jQuery Plugin
    By gilgimech in forum JavaScript
    Replies: 2
    Last Post: 05-10-2012, 05:10 AM
  2. How to add break for jQuery plugin??
    By XManBG in forum JavaScript
    Replies: 0
    Last Post: 08-27-2011, 08:13 PM
  3. jQuery Autosave plugin... can't get it to work
    By acctman in forum JavaScript
    Replies: 0
    Last Post: 10-11-2010, 02:22 PM
  4. jQuery Form Plugin
    By nikomou in forum JavaScript
    Replies: 1
    Last Post: 09-28-2010, 08:56 AM
  5. Resolved jQuery Cookies plugin
    By Snookerman in forum JavaScript
    Replies: 3
    Last Post: 12-26-2008, 03:01 PM

Bookmarks

Posting Permissions

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