Jquery bagian 18 Effect .toggle()

HTML (jquery.html)

<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<button>Toggle</button>
<p>Hello</p>
<p style="display: none">Good Bye</p>
<script>
$("button").click(function () {
$("p").toggle();
});
</script>
</body>
</html>

Hasil :



Hello

Tidak ada komentar:

Posting Komentar

Leave a message