简单文本悬浮div提示效果
<html>
<head>
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$("a").each(function() {
$(this).mouseover(function() { $(this).next("div").css("left", function() {
return $(this).prev("a").offset().left - $(this).width();
});
$(this).next("div").css("top", function() {
return $(this).prev("a").offset().top;
}) var str = "";
str += "<div style='color:red;'><ul style='width:100%; margin-left:0;'><li style='float:left; width:50%;'>11</li><li style='float:left; width:30%;'>33</li><li style='float:left; width:15%;'>55</li></ul></div/>";
str += "<div style='color:blue;'><ul style='width:100%; margin-left:0;'><li style='float:left; width:50%;'>22</li><li style='float:left; width:30%;'>44</li><li style='float:left; width:15%;'>66</li></ul></div/>";
$("a").each(function() {
$(this).next("div").html(str);
}); $(this).next("div").toggle();
}); $(this).mouseout(function() {
var id = $(this).prev("input[type='hidden']").prev("input[type='hidden']").val();
$(this).next("div").toggle();
}); });
});
</script>
</head>
<body>
<div>
<div style="width:900px;float:left;">
test tooltip
</div>
<div style="float:left;">
<table>
<tr><td>
<a></a>
<div style="position: absolute; top: 200; left: 300; display: none; width: 560; height: auto;
background-color: yellow; color: Black; border: solid black 1px;" id="floatDIV">
</div>
</td></tr>
<tr><td>
<a></a>
<div style="position: absolute; top: 200; left: 300; display: none; width: 560; height: auto;
background-color: yellow; color: Black; border: solid black 1px;" id="floatDIV">
</div>
</td></tr>
</table> </div>
</div>
</body>
</html>

简单文本悬浮div提示效果的更多相关文章
- 超简单的js实现提示效果弹出以及延迟隐藏的功能
自动登录勾选提示效果 要求:鼠标移入显示提示信息框:鼠标离开,信息框消失,消失的效果延迟 <!DOCTYPE html> <html lang="en"> ...
- JQuery实现一个简单的鼠标跟随提示效果
效果体验:http://hovertree.com/texiao/jsstudy/2/ 实现思路 1 鼠标移入标题(这里是<a>标签) 创建一个div,div的内容为鼠标位置的文本 将创建 ...
- 简单jquery 鼠标悬停提示效果
记得自己引入jq插件哦~~~ <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...
- [转]让你的网页文本框增加光晕效果与提示,水印(类似QQ2011)
本文转自:http://www.cnblogs.com/xiaofengfeng/archive/2013/01/28/2880344.html 让你的网页文本框增加光晕效果(类似QQ2011) 我们 ...
- jQuery打造用户注册时获取焦点文本框出现提示jquery表单特效
jQuery打造用户注册时获取焦点文本框出现提示效果的jquery表单特效 当获取焦点时,会分别的弹出相应的信息提示框,失去焦点就会隐藏提示信息. 效果兼容性很高,适用浏览器:IE6.IE7.IE8. ...
- js简单实现删除记录时的提示效果
删除记录时的提示效果,挺人性化的,实现的方法有很多,在本文为大家介绍下使用js是如何实现的 样式 复制代码代码如下: <style type="text/css"> ...
- css实现鼠标悬浮后的提示效果
一.概述 很多时候网站中需要在鼠标划过小图标时,悬浮出提示性的文字.比如下图: 鼠标悬浮后的效果 这种效果可以使用css中的伪类hover来实现.但有时候搞不清两个元素的嵌套关系.使用了hover却没 ...
- jQuery实现网页右下角悬浮层提示
最近有同事提到类似网页右下角的消息悬浮提示框的制作.我之前也做过一个类似的例子,很简单.是仿QQ消息.现在感觉之前的那个例子只是说了实现原理,整体上给你的感觉还是太丑,今天为大家带来一个新的例子.是D ...
- BootStrap入门教程 (四) :JQuery类库插件(模态窗口,滚动监控,标签效果,提示效果,“泡芙”效果,警告区域,折叠效果,旋转木马,输入提示)
上讲回顾:Bootstrap组件丰富同时具有良好可扩展性,能够很好地应用在生产环境.这些组件包括按钮(Button),导航(Navigation),缩略图( thumbnails),提醒(Alert) ...
随机推荐
- 卸载或安装Git出现Invalid drive错误的解决方案【简记】
前言:工作中由于公司的电脑(SSD+HDD)硬盘(HDD)突然坏了,只剩下一个系统盘(SSD).然后就是有个比较紧急的需求正在做,申请换的新硬盘不能立刻换上,因为工作的机器不在公司,操作远程机器工作, ...
- Java基础系列--03_Java中的方法描述
方法 (1)方法的定义:就是完成特定功能的代码块. 注意:在很多语言里面有函数的定义,而在Java中,函数被称为方法. (2)格式: 修饰符 返回值类型 方法名(参数类型 参数名1,参数类型 参数名2 ...
- PowerDesigner 提示 Existence of index、key、reference错误
一.建立一个表后,为何检测出现Existence of index的警告 A table should contain at least one column, one index, one key, ...
- nginx 配置 rewrite 跳转
在访问 test.com 网站时,会自动跳转到 www.test.com ,这是因为该网站做了 URL rewrite 重定向,一般网页重定向跳转分为两种,301 和 302 :301,302 都是H ...
- Cordova入门系列(三)Cordova插件调用 转发 https://www.cnblogs.com/lishuxue/p/6018416.html
Cordova入门系列(三)Cordova插件调用 版权声明:本文为博主原创文章,转载请注明出处 上一章我们介绍了cordova android项目是如何运行的,这一章我们介绍cordova的核心 ...
- ZooKeeper 之快速入门
-----------------破镜重圆,坚持不懈! 1. 概述 Zookeeper是Hadoop的一个子项目,它是分布式系统中的协调系统,可提供的服务主要有:配置服务.名字服务.分布式同步.组服务 ...
- JasperReports® Library | Jaspersoft Community
JasperReport报表导出踩坑实录 - 小卖铺的老爷爷 - 博客园https://www.cnblogs.com/laoyeye/p/7707149.html jasperreport_百度百科 ...
- SSM项目整合Quartz
一.背景 SSM项目中要用到定时器,初期使用Timer,后来用spring 的schedule,都比较简单,所以功能比较单一而且他们不能动态的配置时间.后来就研究quartz,准备整合到项目中.Qua ...
- 【调试工具】tcpdump
[tcpdump]https://linux.cn/article-10191-1.html
- window.open() & iframe & tab
window.open() & iframe & tab window.open() open pages in the same window / tab https://stack ...