I am using CSS & Javascript Toolbox in WordPress , and I have an element that changes the opacity with the class="casa"
. When I do onClick
, I use this code, but it does not work:
<script type="text/javascript">
jQuery(document).ready(function($){
var casa = $('.casa');
$('.casa').on('click',function($){
$('.casa').css('opacity', '0.5');
});
})
</script>
How is this solved?