HTML テンプレートのリストでStackOverflow ( jQuery image hover color overlay ) にあるように、jQuery 効果を使用しようとしています。効果はありますが、残念ながらリンクをクリックしても次のページに移動しません。
HTML マークアップは...
<ul class="rollover-effect">
<li><a href="page.html"><img src="image.jpg" alt="Image Title" /></a></li>
<li><a href="page.html"><img src="image.jpg" alt="Image Title" /></a></li>
<li><a href="page.html"><img src="image.jpg" alt="Image Title" /></a></li>
</ul>
...そして私のjQueryは...
jQuery('ul.rollover-effect a').bind('mouseover', function(){
jQuery(this).parent('li').css({position:'relative'});
var img = jQuery(this).children('img');
jQuery('<div />').text(' ').css({
'height': img.height(),
'width': img.width(),
'background-color': 'black',
'position': 'absolute',
'top': 0,
'left': 0,
'opacity': 0.0,
'cursor': 'pointer'
}).bind('mouseout', function(){
jQuery(this).fadeOut(200, function(){
jQuery(this).remove();
});
}).insertAfter(this).animate({
'opacity': 0.40
}, 200);
});
これがなぜなのか、誰にもわかりますか?クリックして次のページに移動できるようにしたい。それは私を悩ませている !ありがとう。