31-08-2012, 15:16
Witam
Dzięki wielkie z tym że mi to nie działa możliwe ze nie bardzo umiem zastosować bibliotekę jq.
teraz mam taki pełny kod:
Dzięki wielkie z tym że mi to nie działa możliwe ze nie bardzo umiem zastosować bibliotekę jq.
teraz mam taki pełny kod:
Kod:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script>
<style type="text/css">
.not-grey{
filter: none;
-webkit-filter: grayscale(0);
opacity: 1;
color: gray;
}
.grey{
filter: url(filters.svg#grayscale); /* Firefox */
filter: gray; /* IE */
opacity: 0.25;
-webkit-filter: grayscale(1); /* Webkit */
}
</style>
<script>
$(".grey").each(function(){
$(this).hover(function(){
$(".grey").not(this).removeClass(".grey").addClass(".not-grey");
});
});
</script>
</head>
<body>
<a href="#"><img src="http://i.imgur.com/M5TIb.jpg" width="300" class=gray></a>
<a href="#"><img src="http://i.imgur.com/M5TIb.jpg" width="300" class=gray></a>
<a href="#"><img src="http://i.imgur.com/M5TIb.jpg" width="300" class=gray></a>
<a href="#"><img src="http://i.imgur.com/M5TIb.jpg" width="300" class=gray></a>
</body>
</html>