jQuery Show/Hide Example in Jsf
jQuery Show/Hide Example in Jsf:
Program:
[html]
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<script>
$(document).ready(function() {
$("#content").hide();
$("#show_button").click(function() {
$("#content").show();
});
$("#hide_button").click(function() {
$("#content").hide();
});
});
</script>
</h:head>
<h:body>
<h:commandButton value="show" id="show_button" />
<h:commandButton value="hide" id="hide_button" />
<div id="content">Welcome to Javadomain.in</div>
</h:body>
</html>
[/html]
Output:
Recommended Books: