Friday, May 7, 2010

Create a Tooltip with jQuery


Tooltip is a kind of title on the link, either a banner or a common link. examples in this blog you can highlight the existing Home button above. The trick is:

1. It uses jquery tooltip, for that you need to install the following script (if indeed you have not yet), well above the </ head> :

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript">

2.
Enter the following javascript,under jquery script above.


<!-- begin Tooltips --> <script type='text/javascript'> $(document).ready(function(){ $("a.tooltip").easyTooltip(); }); </script> <script type="text/javascript"> //<![CDATA[ (function($){$.fn.easyTooltip=function(options){var defaults={xOffset:20,yOffset:30,tooltipId:"easyTooltip",clickRemove:false,content:"",useElement:""};var options=$.extend(defaults,options);var content;this.each(function(){var title=$(this).attr("title");$(this).hover(function(e){content=(options.content!="")?options.content:title;content=(options.useElement!="")?$("#"+options.useElement).html():content;$(this).attr("title","");if(content!=""&&content!=undefined){$("body").append("<div id='"+options.tooltipId+"'> "+content+"</div> ");$("#"+options.tooltipId).css("position","absolute").css("top",(e.pageY-options.yOffset)+"px").css("left",(e.pageX+options.xOffset)+"px").css("display","none").fadeIn("fast")}},function(){$("#"+options.tooltipId).remove();$(this).attr("title",title)});$(this).mousemove(function(e){$("#"+options.tooltipId).css("top",(e.pageY-options.yOffset)+"px").css("left",(e.pageX+options.xOffset)+"px")});if(options.clickRemove){$(this).mousedown(function(e){$("#"+options.tooltipId).remove();$(this).attr("title",title)})}})}})(jQuery); //]]> </script>



3.
Next enter the css code, you can modify this css code, such as color, or you can use a background image (as the original of this script).

#easyTooltip{ padding:5px 10px; border:1px solid #EF6D21; background: #181C18; color:#E0EFE0; }

4. This is the last stage to enable tooltips function, namely input the following code in every link of your choice.

class = 'tooltip' title = 'insert appropriate you like here'

application such as the following example:


<a class="tooltip" href="http://draft.blogger.com/" title="Home"> Home </a>


Thus the whole stage, good luck.

seo scripts, how to find keyword tools, free keywords, keyword tool, seo scripts for web, html sript blogspot seo, free seo download script, do I know which keywords used on our website, seo keyword tools free, free seo blogger, how to create SEO keywords and description, placing the right keywords, how to write description and keywords SEO, Keyword Tool, see our web keywords, free download script on the website, free seo scripts, keyword search tool, free seo, how to use free seo, seo script Blogspot, seo keywords, free seo, blog seo script, writing in joomla google keyword, SEO Download PHP script, script links, download script = SEO, how to create a keyword, SEO blogger templates free downloads, keyword tools php script, free script download link bloggers, link script, how memebuat keywords in webmaster tools, scripts link in blogger, Maximum characters in google keywords, Free SEO templates, free seo good, using sniper seo, seo scripts, php seo tool, keyword suggestion ajax scripts, create a php script search suggestion, KEYWORD KNOW HOW MANY ARE MOST IN VISIT, the script for free software for bloggers, writing on the web module for free download, software to find the right keywords for your site, create link Travian own tools, free seo tools, how to create the appropriate keywords on the blog, how to find web keywords, free keywords tool, seo right way, the function of metadata information in an article joomla keywords, SEO scripts for bloggers, how to find keywords blogspot, how to create a link on Travian, KEYWORD HOW TO MAKE A NUMBER 1 IN SEARCH WEBSITE ENGINE, scripts search links, how to use the keyword sniper, free seo php scripts, how to know the script from the web, SEO script free blogs, making the keyword at the bloggers, seo php scripts, free seo tool for joomla, php scripts to enhance seo, free seo friendly scripts for blogs, find a web script, shooting script in flash, how to create a script for keywords, how to write keywords on search engines, how to know keywords from cpanel, scripts to improve SEO, free software to know keywoard, maximal script on the blog, how to create keyword seo, free script seo, blog seo free scripts, free download ebook writing web, free keyword tool, how to know the answer yahoo local host, free seo tools, keyword and description maximum writing on the web, php scrip keyword tool

Create a Tooltip with jQuery
4/ 5
Oleh

Berlangganan via email

Suka dengan postingan di atas? Silakan berlangganan postingan terbaru langsung via email.