Hello, I was wondering if someone can help me shrink this jquery script down a bit? Right now, I have the ID on hover, but that can be changed to a class if need be.
I'm sure there must be some way of doing it with "this" instead of having to list each and every one down.
Below is an example with 2 of 11 different functions. I'm hoping there's some way of shrinking this down... like I said, if I need to change the id's to Classes, that is fine too.
Thanks! Troy
<script>
$(document).ready(function(){
$("#gfo-1").hover(
function() {
$(".gfo-1-arrow").stop().animate({"opacity": "1"}, "slow");
},
function() {
$(".gfo-1-arrow").stop().animate({"opacity": "0"}, "slow");
});
$("#gfo-2").hover(
function() {
$(".gfo-2-arrow").stop().animate({"opacity": "1"}, "slow");
},
function() {
$(".gfo-2-arrow").stop().animate({"opacity": "0"}, "slow");
});
});
</script>