需要修改扩展下一个jquery插件

WBOY
Release: 2016-06-23 14:18:34
Original
917 people have browsed it

本帖最后由 amu1433 于 2013-08-07 16:23:59 编辑

jQuery插件

http://www.0917cc.com/Upfiles/rar/GlideView/

这是预览地址


我自己写的
 $("#idGlideView img").each(function(){                $(this).css('opacity', '0.5');            }).hover(function(){                $(this).animate({opacity:1.0});            }, function(){                $(this).animate({opacity:0.5});            });
Copy after login


我希望加到插件里面..就是显示哪个图片,哪个图片就是高亮的.其他的都是暗淡的!

不做的怎么加进去...


回复讨论(解决方案)

作为插件,就需要有一个初始化的过程
就是说 "#idGlideView img" 是作为参数传递给初始化方法
而初始化方法把你的代码绑定在鼠标事件上

这似乎不是改在 php 版面讨论的问题

我就是因为改半天插件了 不会改啊..请求帮我改下...显示哪个图片,哪个图片就是高亮的.其他的都是暗淡的!谢谢

外加20分,改半天了,不行,真心求教!

你的页面就是这个效果,还要怎么改?

就是说显示那个图片 要永久是亮的! 其他的都是opacity:0.5 我现在这个效果 鼠标离开就不亮了

麻烦帮忙 把这个放上去显示两的 这个特效加到这个插件里面!

/*#idGlideView div img{filter:alpha(opacity=70); -moz-opacity:0.7; -khtml-opacity: 0.7; opacity: 0.7;}*/#idGlideView div img{filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.5;}#idGlideView div.focus img{filter:alpha(opacity=100); -moz-opacity:1; -khtml-opacity: 1; opacity: 1;}
Copy after login



 //相关设置    Set: function (index) {        if (index < 0) {            //鼠标移出容器返回默认状态            this.Each(function (oList, oText, i) {                oList._target = this._width * i;                if (oText) { oText._target = this._height_text; }             })        } else {            //鼠标移到某个滑动对象上            this.Each(function (oList, oText, i) {                oList.className = i == index ?'focus':'';////////////////增加这句就行,给容器增加focus样式的                oList._target = (i <= index) ? this._width_min * i : this._width_min * (i - 1) + this._width_max;                if (oText) { oText._target = (i == index) ? 0 : this._height_text; }            })        }        this.Move();    }
Copy after login

楼上正确  谢谢!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!