I'm trying to get hover effect similar to this example. But couldn't get it. Here is the link
标签:
jquery-hover
相关问题
- jquery preventing hover function on touch
- detect mouseover of select option in all browsers
- How to unbind() .hover() but not .click()?
- jQuery hovers don't work in IE10 but works in
- how to get a hover effect with jQuery?? Its not wo
相关文章
- how to get a hover effect with jQuery?? Its not wo
- jQuery on('hover') Event Replacement
- Making an element visible by hovering another elem
- jQuery hover dependent on two elements
- jQuery的鼠标离开和clearInterval不工作(jQuery mouseleave and
- 的jQuery - 替换动态图像源的主图像源(jQuery - Replace main imag
- jQuery的:如何在悬停的div边框半径和边距添加过渡?(jQuery: How to add t
- jQuery的:如何在悬停的div边框半径和边距添加过渡?(jQuery: How to add t
It looks like the code copied to the new page is missing the position:relative, which would fix the issue. Now, for security, you may want to limit the height of the block and set the overflow to hidden.
Your image is 404ing due to your css rule for .project .thumb a{}
It points to "images/snbw_thumb.jpg" but you'll likely want to use "/images/snbw_thumb.jpg"
Bad URL : http://dragonfly.zymichost.com/css/images/snbw_thumb.jpg
Good URL : http://dragonfly.zymichost.com/images/snbw_thumb.jpg
(Also, it looks like your pages aren't really serving 404s as the bad URL )
Hope this helps
-Chris
On test page this is your css:
On production page:
Add
position: relative
to.project .thumb
Your
<script>
tag references ajquery-1.2.6.min.js
which does not exist. Put that file in the same directory ashovereffect.html
on your web server.Or, perhaps even better, get JQuery from Google Libraries:
The reason it's not working is because you are missing a css property
notice that you have this line in your test page.
the way you are using jQuery's animate function to change the position of the top image {top:150px}, so you need make it absolutely position for this to work.
Also the
.project .thumb a line
is missing it's width and height.Also note that if you just add that line, the affect still won't be the way you expect. Create an outer
div
with anoverflow:hidden
.Its because in your real project your css is in the /css directory. So your CSS style is looking for /css/images/snbw_thumb.jpg which doesn't exist. Change your CSS style to ../images/snbw_thumb.jpg and it should fix it.