<script> $(".class").hover( function () { $('.class').css('opacity', '0.5'); }, function () { $('.class').css('opacity', '1'); } ); </script> 

It is necessary to write only with the help of css.
Is there a solution to this issue without jquery?

    1 answer 1

     .class{ opacity:1; } .class:hover{ opacity: 0.5; } 
    • <script> $ (". classBtn"). hover (function () {$ ('. classImg'). css ('opacity', '0.5');}, function () {$ ('. classImg'). css ('opacity', '1');}); </ script> Button under the picture. - Anonim
    • one
      And for such a scenario, try to implement as in article.stackoverflow.com/a/338211/204549 - Vorobey.A