In this Web Programming tutorial we will learn that how we can use IF and ELSE Condition in Jquery to show or Hide an element on a web form. below is the code:
Code for JQuery:
HTML Button Code:
Below code will check if Div element is hidden than it will make it show else it will nake it hidden.
Code for JQuery:
$('#toggleButton').click(function() { if ($('#disclaimer').is(':visible')) { $('#disclaimer').hide(); } else { $('#disclaimer').show(); } });
No comments:
Post a Comment