【学习】jquery 插件-Tooltip
2014-04-16 15:44
363 查看
下载地址我的资源
实现效果:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> * { font-family: monaco; color: white; } div.item { min-width:100px; min-height:50px; background-color: maroon; text-align:center; line-height:25px; padding:10px;} div#item_1 { position: absolute; top: 50px; left: 50px; } div#item_2 { position: absolute; top: 500px; left: 0px; } div#item_3 { position: absolute; top: 0px; left: 500px; } div#item_4 { position: absolute; top: 500px; left: 500px; } div#item_5 { position: absolute; top: 800px; left: 500px; } </style> <link rel="stylesheet" href="stylesheets/jquery.tooltip/jquery.tooltip.css" type="text/css" /> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script type="text/javascript" src="javascripts/jquery.tooltip.js"></script> <script type="text/javascript"> $j = jQuery.noConflict(); $j(document).ready(function(){ $j("div.item").tooltip(); }); </script> </head> <body> <div id="item_1" class="item"> <div class="tooltip_description" style="display:none" title="Item 1 Description"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </div> <div id="item_2" class="item"> Item 2 <div class="tooltip_description" style="display:none" title="Item 2 Description"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </div> <div id="item_3" class="item"> Item 3 <div class="tooltip_description" style="display:none" title="Item 3 Description"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </div> <div id="item_4" class="item"> Item 4 <div class="tooltip_description" style="display:none" title="Item 4 Description"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </div> <div id="item_5" class="item tooltipleft"> Item 5 <br/> Force Left <div class="tooltip_description" style="display:none" title="Item 4 Description"> Just add a CSS Class 'tooltipleft' to disable the auto-direction and have the tip come in from left with right-arrow. </div> </div> </body> </html>
实现效果:
相关文章推荐
- 【转载】【JQuery学习】jQuery插件开发
- jQuery学习之:Validation表单验证插件
- jQuery学习之:jqGrid表格插件——参数配置
- 快速学习jQuery插件 jquery.validate.js表单验证插件使用方法
- jQuery 插件学习笔记
- BootStrap学习日记之 tooltip 插件使用
- 30个非常流行的提示信息插件(jQuery Tooltip Plugin)
- jQuery插件学习之选项卡Tab
- Jquery 插件学习实例1-插件制作说明与tableUI优化
- jQuery插件---tooltip(超链接提示,图片提示).
- jquery学习(四)-如何书写自定义的jquery插件
- jQuery框架学习第十一天:实战jQuery表单验证及jQuery自动完成提示插件
- JQUERY插件学习之jQuery UI
- jQuery学习之:jqGrid表格插件——参数配置
- 前端学习(四) —— jQuery插件DataTables的使用
- jQuery学习之用自定义插件来扩展jQuery
- jquery插件开发学习笔记(一)
- 轻松学习jQuery插件EasyUI EasyUI创建CRUD应用
- jQuery学习之:Validation表单验证插件
- 轻松学习jQuery插件EasyUI EasyUI表单验证