Am working on mock test portal project, Can you suggest me how to show or hide a div based on the value of button.
Html code ##
<input type='button' value='Generate' onclick='f1(this)' />
Div section
<div id="sub_section" class="col s6" style="display:none">
<TABLE STYLE="BORDER:2PX; BACKGROUND-COLOR:BLACK;">
<TR>
<td><label style="color:black;">TAMIL</label></td>
</TR>
</TABLE>
</div>
</div>
jquery
function f1(objButton){
var a=objButton.val;
if(var a=='Generate')
$("#sub_section").show();
}
jquery min.js
<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>