[英]Jquery Hover over gallery image effect
I'm new to jquery. 我是jquery新手。 I found a lightbox gallery on a website that I want to emulate.
我在要模仿的网站上找到了一个灯箱画廊。 I know how to use the standard light box code here http://leandrovieira.com/projects/jquery/lightbox/
我知道如何在此处使用标准灯箱代码http://leandrovieira.com/projects/jquery/lightbox/
But I want my thumbnails to have a hover effect where a new color border appears with text over the image like on the site below. 但我希望我的缩略图具有悬停效果,其中新的彩色边框会在图像上方显示文本,就像下面的网站一样。
Shown here http://wozcreative.com/ 此处显示http://wozcreative.com/
This is a wordpress site with a plugin. 这是一个带有插件的wordpress网站。
How do I do the same with jquery? 我该如何使用jquery?
It looks like your answer is in the code of the page in question 您的答案似乎在相关页面的代码中
<!-- Portfolio Effect Script -->
<script type="text/javascript">
jQuery(function(){
jQuery('#portfolio li', this ).mouseenter(function() {
jQuery('.description', this).slideDown('fast');
});
jQuery('#portfolio li', this ).mouseleave(function() {
jQuery('.description', this).slideUp('fast');
});
});
</script>
I'm not sure why he's calling JQuery explicitly (I think it's because he's also using yui) but you could replace the JQuery
with $
我不确定他为什么要显式调用JQuery(我认为这是因为他也在使用yui),但是您可以将
JQuery
替换为$
Anyway, it looks like he has list elements with images and hidden descriptions, when you mouse over it unhides the description. 无论如何,当您将鼠标悬停在其上时,看起来他具有带有图像和隐藏说明的列表元素。
This is exactly what you are looking for. 这正是您想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.