hover image switch
hover image switch
Wondering if I could have written this more efficiently.
Three images. Hover one, the other two switch.
- <script>
- $(document).ready(function() {
- $(".imgc").hover(function(){
- $(".imgr").hide();
- $(".imga").hide();
- },function(){
- $(".imgr").show();
- $(".imga").show();
- });
- $(".imgr").hover(function(){
- $(".imgc").hide();
- $(".imga").hide();
- },function(){
- $(".imgc").show();
- $(".imga").show();
- });
- $(".imga").hover(function(){
- $(".imgr").hide();
- $(".imgc").hide();
- },function(){
- $(".imgr").show();
- $(".imgc").show();
- });
- });
- </script>