I want to show div if checkbox is checked. If not, I want to hide it. Here is my code, but it doesn't work.
$(".formularz_zgloszeniowy .firma input[type='checkbox']").change(function() {
if(this.checked) {
$(".formularz_zgloszeniowy .formularz_firma").css('display','block');
}
else
{
$(".formularz_zgloszeniowy .formularz_firma").css('display','none');
}
});
I'm getting this error:
Uncaught SyntaxError: missing ) after argument list
EDIT:
Here is full code in head tag:
<script type="text/javascript">
jQuery(document).ready(function($){
$(".formularz_zgloszeniowy .firma input[type='checkbox']").change(function() {
if($(this).is(":checked")) {
$(".formularz_zgloszeniowy .formularz_firma").css('display','block');
}
else
{
$(".formularz_zgloszeniowy .formularz_firma").css('display','none');
}
});
});
</script>
\u200bcharacters breaking your code.