谁有鼠标划过图片,图片会放大(在另一个层)的js代码,不是直接在同样一个页面上方法
解决方案 »
- 急急急!!!遍历ul中所有li标签的里面的内容,如果有和文本框中的内容一致的li的话,什么也不做,如果没有,清空文本框中的内容。
- JQuery如何重置下拉框?---急
- 求助
- 用纯JAVASCRIPT在客户端画的饼图,对浏览器有什么限制?怎么有些浏览器显示不出来
- 兼容firefox
- innerHTML加载内容包含JS不执行
- js里面replace参数
- 关于JS的问题
- 三个输入框,a,b,c,当a,和b输入整数后,c自动出现a和b的乘积
- Javascript能不能实现"下载文件到指定的目录",或安装"某程序"?谢谢!
- 求javascript和cookies实现的随机链接
- Swing JTable做中国式报表?
demo地址:http://jquery.bassistance.de/tooltip/demo/
<div><img src="a.gif" width="100" height="100"></div>
<div><img src="a.gif" width="200" height="200"></div>
onmouseover让第一个层隐藏第二个层显示
是这个意思不
鼠标滑过图片的效果
$.fn.floatWith = function(obj,idx){
idx = typeof(idx)!='number' || !idx ? 0 : idx;
var elem = $(obj),offset = elem.offset(),_top = offset.top,_left =offset.left,width = elem.outerWidth(),height=elem.outerHeight();
var floatWidth = this.outerWidth(), floatHeight = this.outerHeight(), cssPos = null;
switch(idx){
case 0: cssPos = {top:_top+height,left:_left}; break;
case 1: cssPos = {top:_top+height,left:_left+width}; break;
case 2: cssPos = {top:_top,left:_left+width}; break;
case 3: cssPos = {top:_top-floatHeight,left:_left+width}; break;
case 4: cssPos = {top:_top-floatHeight,left:_left}; break;
case 5: cssPos = {top:_top-floatHeight,left:_left-floatWidth}; break;
case 6: cssPos = {top:_top,left:_left-floatWidth}; break;
case 7: cssPos = {top:_top+height,left:_left-floatWidth}; break;
default:cssPos = {top:_top+height,left:_left}; break;
}
this.eq(0).css({'position':'absolute'}).css(cssPos).hide().show(200);
return this;
};