This is supposed to be my first Jquery code that I am writing. I have used this and many more examples to make the simplest jquery code to display Hello on Button Click(W3Sc
You Ca Check it here http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide_show
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
});
</script>
</head>
<body>
<p>If you click on the "Hide" button, I will disappear.</p>
<button id="hide">Hide</button>
<button id="show">Show</button>
</body>
</html>
<div>
<input type="button" id="btn" class="btn btn-default" value="click me">
</div>
<div id="Create" style="display:none">
Hello
</div>
@section Scripts{
@Scripts.Render("~/bundles/jqueryval")
<script type="text/javascript">
$(document).ready(function () {
$("#btn").click(function () {
$("#Create").toggle();
});
});
</script>
}
$(document).ready(function () {
$("#btn").click(function () {
$("#btn").click(function () { $("#Create").show();
});
});