Jquery 鼠标跟随提示层(可显示文本,Div ,Table, Html 等等)

鼠标经过显示隐藏div 鼠标经过显示隐藏层js,隐藏层可加css样式,可随意控制大小,js有详细注释 立即下载


Web网站有不少需要用到tip提示层的地方,结合jquery的jquery.cluetip.js ,可以实现本地字符或ajax异步调用显示提示层。如以上购评分明细提示。(优势:宽度需要调用页加载时定义,高度auto , 且三角指定图标能根据显示层的大小位置来调用它的位置,达到醒目直观的效果)

jquery.cluetip.css
/* global */
#cluetip-close img 
{
  border
: 0;
}
#cluetip-title 
{
  overflow
: hidden;
   
}
#cluetip-title #cluetip-close 
{
  float
: right;
  position
: relative;
}
#cluetip-waitimage 
{
  width
: 43px;
  height
: 11px;
  position
: absolute;
  background-image
: url(../img_new/cluetipwait.gif);
}
.cluetip-arrows 
{
  display
: none;
  position
: absolute;
  top
: 0;
  left
: -11px;
  height
: 22px;
  width
: 11px;
  background-repeat
: no-repeat;
  background-position
: 0 0;
}
#cluetip-extra 
{
  display
: none;
}
/***************************************
   =cluetipClass: 'default' 
-------------------------------------- 
*/

.cluetip-default 
{
  background-color
: #d9d9c2;
}
.cluetip-default #cluetip-outer 
{
  position
: relative;
  margin
: 0;
  background-color
: #d9d9c2;
}
.cluetip-default h3#cluetip-title 
{
  margin
: 0 0 5px;
  padding
: 8px 10px 4px;
  font-size
: 14px;
  font-weight
: normal;
  background-color
: #87876a;
  color
: #fff;
}
.cluetip-default #cluetip-title a 
{
  color
: #d9d9c2;
  font-size
: 0.95em;
}  
.cluetip-default #cluetip-inner 
{
  padding
: 10px;
}
.cluetip-default div#cluetip-close 
{ 
  text-align
: right;
  margin
: 0 5px 5px;
  color
: #900;
}

/* default arrows */

.clue-right-default .cluetip-arrows 
{
  background-image
: url(../img_new/cluetipdarrowleft.gif);
}
.clue-left-default .cluetip-arrows 
{
  background-image
: url(../img_new/cluetipdarrowright.gif);
  left
: 100%;
  margin-right
: -11px;
}
.clue-top-default .cluetip-arrows 
{
  background-image
: url(../img_new/cluetipdarrowdown.gif);
  top
: 100%;
  left
: 50%;
  margin-left
: -11px;
  height
: 11px;
  width
: 22px;  
}  
.clue-bottom-default .cluetip-arrows 
{
  background-image
: url(../img_new/cluetipdarrowup.gif);
  top
: -11px;
  left
: 50%;
  margin-left
: -11px;
  height
: 11px;
  width
: 22px;
}

/***************************************
   =cluetipClass: 'jtip'
-------------------------------------- 
*/
.cluetip-jtip 
{
  background-color
: transparent;
   display
:none;
}
.cluetip-jtip #cluetip-outer 
{
  border
: 1px solid #559EF8;
  position
: relative;
  background-color
: #fff;
  
}

.cluetip-jtip h3#cluetip-title 
{
  margin
: 0 0 5px;
  padding
: 2px 5px;
  font-size
: 12px;
  font-weight
: normal;
  background-color
: #559EF8;
  color
: #fff; 
}

.cluetip-jtip #cluetip-inner 
{
  padding
: 0 5px 5px;
  display
: inline-block;
  
  
}
.cluetip-jtip div#cluetip-close 
{ 
  text-align
: right;
  margin
: 0 5px 5px;
  color
: #900;  
  display
:none;
}

/* jtip arrows */

.clue-right-jtip .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiparrowleft.gif);
}
.clue-left-jtip .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiparrowright.gif);
  left
: 100%;
  margin-right
: -11px;
}
.clue-top-jtip .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiparrowdown.gif);
  top
: 100%;
  left
: 50%;
  margin-left
: -11px;
  height
: 11px;
  width
: 22px;  
}  
.clue-bottom-jtip .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiparrowup.gif);
  top
: -11px;
  left
: 50%;
  margin-left
: -11px;
  height
: 11px;
  width
: 22px;
}

/***************************************
   =cluetipClass: 'rounded'
-------------------------------------- 
*/

.cluetip-rounded 
{
  background
: transparent url(../img_new/cluetipbl.gif) no-repeat 0 100%;
  margin-top
: 10px;
  margin-left
: 12px;
}

.cluetip-rounded #cluetip-outer 
{
  background
: transparent url(../img_new/cluetiptl.gif) no-repeat 0 0;
  margin-top
: -12px;
}

.cluetip-rounded #cluetip-title 
{
  background-color
: transparent;
  padding
: 12px 12px 0;
  margin
: 0 -12px 0 0;
  position
: relative;
}
.cluetip-rounded #cluetip-extra 
{
  position
: absolute;
  display
: block;
  background
: transparent url(../img_new/cluetiptr.gif) no-repeat 100% 0;
  top
: 0;
  right
: 0;
  width
: 12px;
  height
: 30px;
  margin
: -12px -12px 0 0;
}
.cluetip-rounded #cluetip-inner 
{
  background
: url(../img_new/cluetipbr.gif) no-repeat 100% 100%;
  padding
: 5px 12px 12px;
  margin
: -18px -12px 0 0;
  position
: relative;
}

.cluetip-rounded div#cluetip-close 
{ 
  text-align
: right;
  margin
: 0 5px 5px;
  color
: #009;
  background
: transparent;
}
.cluetip-rounded div#cluetip-close a 
{
  color
: #777;
}

/* rounded arrows */

.clue-right-rounded .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiprarrowleft.gif);
}
.clue-left-rounded .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiprarrowright.gif);
  left
: 100%;
  margin-left
: 12px;
}
.clue-top-rounded .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiprarrowdown.gif);
  top
: 100%;
  left
: 50%;
  margin-left
: -11px;
  height
: 11px;
  width
: 22px;  
}  
.clue-bottom-rounded .cluetip-arrows 
{
  background-image
: url(../img_new/cluetiprarrowup.gif);
  top
: -23px;
  left
: 50%;
  margin-left
: -11px;
  height
: 11px;
  width
: 22px;
}



/* stupid IE6 HasLayout hack */
.cluetip-rounded #cluetip-title,
.cluetip-rounded #cluetip-inner 
{
  zoom
: 1;
}

.float-left 
{
  float
: left;
  margin-right
: .5em;
  display
: inline;
  position
: relative;
}
.float-right 
{
  float
: right;
  margin-left
: .5em;
  display
: inline;
  position
: relative;
}

jquery-1.3.2.min.js  -- 官方网可下载,这里不再表述。(必须)


jquerycluetipLoad.js  --提示层的基本参数和属性的定义。
/* Jquery 鼠标跟随提示层。
 * 创建人:fooo
 * 创建日期:09-09-23
 * 修改人:
 * 修改日期:
 * 本地字符提示示例:<span title="标题|<%=Str()%>"><a  href="#" >我们的</a></span>
 * Ajax异步调用文件且提示示例:<ol><li><a class="jt" href="#" title="评分项目明细" rel="HandlerAjax.ashx?Name=<%=Security.EncryptQueryString("我们的我我我人大")%>" >clueTip - Ajax异步提示1</a> </li></ol>
 *
 * 改变提示层宽度大小,只需在调用页加入: $.fn.cluetip.defaults.width = '100';  -根据大小调整。
 
*/
 
// $.fn.cluetip.defaults.tracking = true;
 // $.fn.cluetip.defaults.width = 'auto';
$(document).ready(function() 
{
  
//default theme
 
  $(
'a.title').cluetip({splitTitle: '|'});
  $(
'a.basic').cluetip();
  $(
'a.custom-width').cluetip({width: '200px', showTitle: false});
  $(
'h4').cluetip({attribute: 'id', hoverClass: 'highlight'});
  $(
'#sticky').cluetip({sticky: true, closePosition: 'title', arrows: true });
  $(
'#examples a:eq(5)').cluetip({
    hoverClass: 
'highlight',
    sticky: 
true,
    closePosition: 
'bottom',
    closeText: 
'<img src="../img_new/cluetipcross.png" alt="close" width="16" height="16" />',
    truncate: 
60
  });
  $(
'a.load-local').cluetip({local:true, hideLocal: true, sticky: true, arrows: true, cursor: 'pointer'});
  $(
'#clickme').cluetip({activation: 'click', sticky: true, width: 250});
  $(
'ol:first a:last').cluetip({tracking: true});

  
//jTip theme
  $('a.jt:eq(0)').cluetip({
    cluetipClass: 
'jtip', 
    arrows: 
true, 
    dropShadow: 
false,
    sticky: 
true,
    mouseOutClose: 
true,
    closePosition: 
'title',
    closeText: 
'<img src="../img_new/cluetipcross.png" alt="close" />'
  });
  $(
'a.jt:eq(1)').cluetip({cluetipClass: 'jtip', arrows: true, dropShadow: false, hoverIntent: false});
  $(
'span[title]').css({borderBottom: '0px solid #900'}).cluetip({splitTitle: '|', arrows: true, dropShadow: false, cluetipClass: 'jtip'});

  $(
'a.jt:eq(2)').cluetip({
    cluetipClass: 
'jtip', 
    arrows: 
true, 
    dropShadow: 
false, 
    height: 
'150px', 
    sticky: 
true,
    positionBy: 
'bottomTop'    
  });

  $(
'a.jt:eq(3)').cluetip({local: true, hideLocal: false});
  
  $(
'a.jt:eq(4)').cluetip({
    cluetipClass: 
'jtip', arrows: true, 
    dropShadow: 
false, 
    onActivate: 
function(e) {
      
var cb = $('#cb')[0];
      
return !cb || cb.checked;
    }
  });

// Rounded Corner theme
  $('ol.rounded a:eq(0)').cluetip({splitTitle: '|', dropShadow: false, cluetipClass: 'rounded', showtitle: false});
  $(
'ol.rounded a:eq(1)').cluetip({cluetipClass: 'rounded', dropShadow: false, showtitle: false, positionBy: 'mouse'});
  $(
'ol.rounded a:eq(2)').cluetip({cluetipClass: 'rounded', dropShadow: false, showtitle: false, positionBy: 'bottomTop', topOffset: 70});
  $(
'ol.rounded a:eq(3)').cluetip({cluetipClass: 'rounded', dropShadow: false, sticky: true, ajaxCache: false, arrows: true});
  $(
'ol.rounded a:eq(4)').cluetip({cluetipClass: 'rounded', dropShadow: false});    
});




jQuery实现鼠标跟随提示层效果代码(可显示文本,Div,Table,Html等) 主要介绍了jQuery实现鼠标跟随提示层效果代码,具备显示文本,Div,Table,Html等功能.涉及jQuery针对鼠标事件及页面元素的相关操作技巧,需要的朋友可以参考下 立即下载

相关推荐

jQuery实现鼠标滑过Div层背景变颜色的方法

主要介绍了jQuery实现鼠标滑过Div层背景变颜色的方法,涉及jQuery中hover及addClass方法的使用技巧,具有一定参考借鉴价值,需要的朋友可以参考下

[问题记录]--jquery中click事件的累加绑定,点击一次,执行多次

在页面中为一个元素绑定事件,事件执行后页面未刷新且元素还在,然后再次点击,元素又被绑定个点击事件,这样第二次点击就会执行两次。,为元素绑定一个一次性的事件处理函数,这个事件处理函数只会被执行一次。出现问题,第一次编辑后点击确定正常修改,再次修改第一个内容,发现第二个也会变。

weixin_56374326的博客 1262

jquery鼠标放上去显示悬浮层即弹出定位的div层

主要介绍了使用jquery实现的鼠标放上去显示悬浮层即弹出定位的div层,需要的朋友可以参考下

Jquery点击事件连续执行多次

jquery重复执行

lyq8778的博客 1738

jQuery实现div跟随鼠标移动

主要为大家详细介绍了jQuery实现div跟随鼠标移动,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

jQuery实现鼠标移到某个对象时弹出显示层功能

本文实例讲述了jQuery实现鼠标移到某个对象时弹出显示层功能。分享给大家供大家参考,具体如下: /** * 鼠标移上去显示层 * @param divId 显示的层ID * @returns */ $.fn.myHoverTip = function(divId) { var div = $("#" + divId); //要浮动在这个元素旁边的层 div.css("position", "absolute");//让这个层可以绝对定位 var self = $(this); //当前对象 self.hover(function() { div.css("displ

JavaScript和jquery实现连续点击按钮的不同状态切换

页面或者界面上经常会出现“点击某一个按钮然后切换不同的状态”的场景,将自己总结的两种实现方法分享一下。JavaScript: jquery: 案例不复杂,但是页面中用到的频率比较高,简单记录一下。...

weixin_54373461的博客 2667

【STM32开源实战】基于STM32的智能输液监控系统设计与实现

本文详细介绍了基于STM32F103C8T6主控芯片的智能输液监控系统设计与实现。该系统通过光学液位传感器、温度传感器和红外滴速检测模块实时监测输液状态,利用步进电机自动调节滴速,并通过蓝牙实现数据远程传输,为医院提供了一套低成本、高可靠性的智能输液解决方案。

h6i7j8的博客 761

js制作鼠标移动提示层

script type="text/javascript"> function window.onload(){     var tip=document.createElement("DIV")     tip.id="oTip"     with(tip.style)    {         position="absolute"         bord

flynetcn的专栏 1429

手把手教你用CubeMX给GD32F103点灯、调串口(附完整工程)

本文详细介绍了如何使用CubeMX为GD32F103开发板配置GPIO点灯和串口通信,包含完整的工程创建、代码构建和测试流程。特别强调了GD32与STM32的差异点及常见避坑技巧,帮助开发者快速上手GD32开发。

weixin_42566424的博客 313

QT | QT打包生成单个EXE文件

1.以release方式运行程序 2.在release文件夹中找到.exe文件 如果没有找到exe,可能是因为在项目中勾选了shadow build,你可以在构建目录中找到exe 3.将exe放在一个新建的文件夹中,因为待会儿会生成很多dll文件 4.点击电脑左下角搜索QT,打开Qt 5.8 for Desktop (MinGQW 5.3.0 32bit) 5.进入刚刚新建的文件夹,输入wi...

⊳ideal world⊲~ヽ(゚︺゚)Hi 1238

html5跟随div效果,jQuery实现鼠标跟随提示层效果代码(可显示文本,Div,Table,Html等)...

本文实例讲述了jQuery实现鼠标跟随提示层效果代码。分享给大家供大家参考,具体如下:运行效果截图如下:Web网站有不少需要用到tip提示层的地方,结合jquery的jquery.cluetip.js ,可以实现本地字符或ajax异步调用显示提示层。如以上购评分明细提示。(优势:宽度需要调用页加载时定义,高度auto , 且三角指定图标能根据显示层的大小位置来调用它的位置,达到醒目直观的效果)jq...

weixin_42351189的博客 269

Pyinstaller 打包 Pyzbar 时缺失 DLL 文件的排查与修复指南

本文详细解析了使用Pyinstaller打包Pyzbar库时,因缺失关键DLL文件导致程序闪退的常见问题。文章提供了从问题复现、错误诊断到最终修复的完整解决方案,核心在于通过修改.spec配置文件,手动将缺失的libzbar-64.dll等文件添加到打包过程中,确保生成的可执行文件能独立运行。

wdx012345的博客 502

jquery鼠标移入文字提示_Jquery hover鼠标经过时弹出div动态提示语

一、效果图二、需求描述1、鼠标经过table每一行时,弹出div动态提示语;2、div弹出层的位置随鼠标位置的变化而变化;3、鼠标离开table或获取的动态提示语为空时,div弹出层消失。下面我做了一个简单的实现,第一次在博客园写随笔记录下来。三、实现思路1、设计一个div弹出层的样式。该div在页面只有一个,哪里需要就往哪里搬。2、获取并保存鼠标的位置,定位div弹出层的位置。3、获取table...

weixin_29496207的博客 1054

Python爬虫实战:避开巨潮资讯网反爬,稳定获取上市公司年报PDF下载地址

本文详细介绍了如何使用Python和Selenium突破巨潮资讯网的动态加载限制,稳定获取上市公司年报PDF下载地址。通过模拟真实用户操作、智能等待策略和反反爬虫技巧,帮助开发者高效爬取财经数据,适用于股票代码查询和年报分析等场景。

weixin_29065659的博客 1665

10.28华为OD机试真题 新系统 - AI推理任务并行额度最大值 (Java/Py/C/C++/Js/Go)

10.28华为OD机试真题 新系统 - AI推理任务并行额度最大值 (Java/Py/C/C++/Js/Go)

算法大师! 276

Jquery hover鼠标经过时弹出div动态提示语

一、效果图 二、需求描述   1、鼠标经过table每一行时,弹出div动态提示语;   2、div弹出层的位置随鼠标位置的变化而变化;   3、鼠标离开table或获取的动态提示语为空时,div弹出层消失。   下面我做了一个简单的实现,第一次在博客园写随笔记录下来。 三、实现思路   1、设计一个div弹出层的样式。该div在页面只有一个,哪里需要就往哪里搬。   2、获...

weixin_30649859的博客 843

R3LIVE项目实战(3) —双目相机与激光雷达 lidar_camera_calib联合标定

lidar_camera_calib是一个在无目标环境中,用于高分辨率LiDAR(例如Livox)和摄像机之间准确的外部标定工具。我们的算法可以在室内和室外场景中运行,并且只需要场景中的边缘信息。如果场景适合,我们可以实现类似于或甚至超过基于目标的方法的像素级准确度。我们使用标定的外部参数给点云上色,并与实际图像进行比较。A和C是点云的局部放大视图。B和D是与A和C中的点云对应的摄像机图像的部分。

几度春风里的博客 4057

Jquery实现鼠标移到某个对象,弹出显示层。

/** * 鼠标移上去显示层 * @param divId 显示的层ID * @returns */ $.fn.myHoverTip = function(divId) { var div = $("#" + divId); //要浮动在这个元素旁边的层 ...

chutisun0039的博客 112

【AutoCAD中实现双击文本编辑功能】

例如:以下是官方博客例子浅析先加入相关的头文件和库文件。在AutoCAD中有一个很重要的功能,就是双击图形尺寸或文本后会出现一个文本编辑框,用户可在该编辑框中修改文字。本文介绍了如何使用AcEdInplaceTextEditor来实现该功能。实现cad的消息监听。创建一个消息监听的类并在cad中注册来实现消息监听。主要是监听键盘输入。提示:以下是本篇文章正文内容,下面案例可供参考提示:这里对文章进行总结:例如:以上就是今天要讲的内容,本文仅仅简单介绍了的函数和方法。

我的博客 1148

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

html设置鼠标移动变色,table行随鼠标移动变色示例

1、设计表格工号姓名年龄性别2014010101张峰56男2014010102李玉42女2014010103王珂36男2014010104张钰31女2014010105朱顾44男2014010106胡雨35女2014010107刘希30男2014010108孙宇45女2014010109谷雨33男2014010110科宇45女2、设计样式.html_body .body_div{width: 13...

weixin_42308335的博客 2220

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

html+jquery/js+css 实现Table tr鼠标悬停/点击出现弹窗,显示表格行数据

html定义一个div作为弹窗,主要实现的控制样式:display=‘block/none’,使我们定义的div隐藏或者浮现, 主要实现,在table的tr上定义事件,当我们点击或者鼠标悬停,会出现弹框; 1、首先使用html+css+jquery实现; 部分代码如下: html 的 table tr以及弹窗div代码代码,定义一个表格: //表格代码 <div id="demo3"> <tbody> <tr th:each="item1:${list1}" >

weixin_54685622的博客 1万+

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

table行随鼠标变色

table行随鼠标变色 1、设计表格 工号 姓名 年龄 性别 2014010101 张峰

游海东的技术专栏 2256

Layui的实现鼠标移入tips弹框提示、tips悬停提示

Layui的table实现鼠标移入单元格后tips弹框提示

雾林小妖的博客 1320

jquery中关于鼠标事件的操作

关于jquery中关于鼠标事件的某些操作,示例如下: 1.鼠标点击添加事件click(): &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://...

刘小毅的博客 3552

html table 加载进度条,基于jQuery替换table中的内容并显示进度条的代码

效果图如下:http://jialiren.sinaapp.com/jdt/Html代码如下:进度条列序号进度条进度备注其他1 20 20 进度太慢了工作一2 30 30 加油任务二3 80 80 加油!!任务三 4 80 80 加油!!任务三我的目的是把第二列的数值替换成条状图,asp.net girdview 控件生成的也是table标签,因此后面的脚本对gridview的数据呈现也起作用。我...

weixin_39601929的博客 478
上一篇: Discuz!登陆、退出、个人信息修改提交弹出层实现 by cubeking
下一篇: 在VB.net 中连接MySql的类库
ahstudy
博客等级 码龄19年 60粉丝 10原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值