<!DOCTYPE html>
<html>
<head>
<script data-require="jquery@*" data-semver="2.1.4" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>Hello Plunker!</h1>
<button id="btnhide">Hide</button>
<button id="btnShow">show</button>
<button id="btnToggle">Toggle</button>
<button id="btnFade">Fade</button><br/><br>
<input type="text" id="txtname" name="txtname"/>
<button id="display">Display</button>
<div id ="displaydiv"></div>
<script>
$("#btnhide").click(
function()
{
$("h1").hide();
}
);
$("#btnShow").click(
function()
{
$("h1").show();
}
);
$("#btnToggle").click(
function()
{
$("h1").toggle();
}
);
$("#btnFade").click(
function()
{
$("h1").fadeOut("slow");
}
);
$("#display").click(
function()
{
$("#displaydiv").text($("#txtname").val());
}
);
</script>
</body>
</html>
<html>
<head>
<script data-require="jquery@*" data-semver="2.1.4" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>Hello Plunker!</h1>
<button id="btnhide">Hide</button>
<button id="btnShow">show</button>
<button id="btnToggle">Toggle</button>
<button id="btnFade">Fade</button><br/><br>
<input type="text" id="txtname" name="txtname"/>
<button id="display">Display</button>
<div id ="displaydiv"></div>
<script>
$("#btnhide").click(
function()
{
$("h1").hide();
}
);
$("#btnShow").click(
function()
{
$("h1").show();
}
);
$("#btnToggle").click(
function()
{
$("h1").toggle();
}
);
$("#btnFade").click(
function()
{
$("h1").fadeOut("slow");
}
);
$("#display").click(
function()
{
$("#displaydiv").text($("#txtname").val());
}
);
</script>
</body>
</html>
No comments:
Post a Comment