Answers for "show and hide div tag based on checkbox selection using javaScript"

0

show and hide div tag based on checkbox selection using javaScript

<input class="coupon_question" type="checkbox" name="coupon_question" value="1" onchange="valueChanged()"/>

<script type="text/javascript">
    function valueChanged()
    {
        if($('.coupon_question').is(":checked"))   
            $(".answer").show();
        else
            $(".answer").hide();
    }
</script>
Posted by: Guest on September-08-2021

Code answers related to "show and hide div tag based on checkbox selection using javaScript"

Browse Popular Code Answers by Language