Acabo de problarlo de la siguiente manera y no me funciona:
Código PHP:
<script type="text/javascript">
$(document).ready(function() {
$("ul.galeria li").hover(function() { //On hover...
var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
//Set a background image(thumbOver) on the <a> tag
$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
//Animate the image to 0 opacity (fade it out)
$(this).find("span").stop().animate({opacity: 0}, 300);
} , function() { //on hover out...
//Animate the image back to 100% opacity (fade it back in)
$(this).find("span").stop().animate({opacity: 1}, 300);
});
});
</script>
<script>
if(!window.ActiveXObject){
$(document).ready(function() {
$("ul.galeria li").hover(function() { //On hover...
var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
//Set a background image(thumbOver) on the <a> tag
$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
//Animate the image to 0 opacity (fade it out)
$(this).find("span").stop().animate({opacity: 0}, 300);
} , function() { //on hover out...
//Animate the image back to 100% opacity (fade it back in)
$(this).find("span").stop().animate({opacity: 1}, 300);
});
});
}
</script>
Algún apunte u otra alternativa??