jQuery opacity not working

Posted by user1828505 on Stack Overflow See other posts from Stack Overflow or by user1828505
Published on 2012-11-16T03:40:26Z Indexed on 2012/11/16 5:00 UTC
Read the original article Hit count: 240

I am trying to change the opacity of the image after I click the red button instead of adding the different image, and I should not see the red button on the new image

My JS code is below.

http://jsfiddle.net/mwPeb/7/

<script>
    $(document).ready(function () {
        $(".specialHoverOne").hover(function () {
            //  alert("i am here");
            $(".ctaSpecialOne").css("visibility", "visible");

        },

        function () {
            $(".ctaSpecialOne").css("visibility", "hidden");
        });

        $(".ctaSpecialOne").click(function (e) {
            alert("clicked");
            e.preventDefault();
            //$(this).closest('.specialHoverOne').unbind("mouseenter").end().parent().siblings('a').children("img").attr("src", //"http://imgs.zinio.com/magimages/62898189/2012/416242497_200.jpg");                
            $(this).css({
                'opacity': 50
            });

        });

    });
</script>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui