Sunday, February 3, 2013
How can u work by id selector?
Now i will teach how can jquery work by id selector...
Syntax:
$("# id name").hide()
Now just copy this code on notepad and see....
<!DOCTYPE html>
<html>
<head>
<script src="jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#test").hide();
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p id="test">This is another paragraph.</p>
<button>Click me</button>
</body>
</html>
<< Previous || Next >>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment