谁有鼠标划过图片,图片会放大(在另一个层)的js代码 谁有鼠标划过图片,图片会放大(在另一个层)的js代码,不是直接在同样一个页面上方法 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 jquery tooltip 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让第一个层隐藏第二个层显示是这个意思不 不是,大图是在一个层上面现实类似http://search1.taobao.com/browse/0/n-7----------------------0-----------------------g,xovm5krag4ytama-------2-------b--40--bid-0-all-0.htm?ab=ABTestA&ssid=s1 鼠标滑过图片的效果 //以下代码需要jquery.js$.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;}; onresize事件,浏览器兼容搞死人啊 散分,祝大家元旦快乐! 如何实现当单击一小图片时,使其变为另一张小图片(不刷新页面的情况下)在线等候 求助,asp.net,邮箱登录 如何获取iframe编辑器的值 js vs 框架 问一个简单的问题,请大家原谅 javascript如何用正则替换\为\\ 新人求助, jquery的一个小问题 不同页面间动态传递数据的问题。 求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;
};