I currently am using a script that executes a fade effect when mousing over icons (It fades them from color to black and white). I m having issues with it not working properly on an iPad or iPhone because of the hover event.
是否有办法以排除iPad、i、甚至可能还有一种roid装置的状态来总结如下?
<script>
$(document).ready(function() {
$("ul.gallery li").hover(function() { //On hover...
$(this).siblings().each(function () {
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 });
//Fade the image to 0
$(this).find("span").stop(false,false).fadeTo( normal , 0 , function() {
$(this).hide() //Hide the image after fade
});
});
} ,
function() { //on hover out...
$(this).siblings().each(function () {
//Fade the image to 1
$(this).find("span").stop(false,false).fadeTo( normal , 1).show();
});
});
});
</script>
Thank You