Hide Example1 jquery

Posted by Satyapriyanayak under jQuery category on | Points: 40 | Views : 1248
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript">
//$(this).hide(); // button will hide
//$("#d1").hide(); // element with id=d1 will hide
//$("div#d1").hide(); // div element with id=d1 will hide
//$("p").hide(); // html element p will hide
//$(".c1").hide(); // html element will class c1 hide
$("p").css("background-color", "#0033CC");
$("p.c1").hide(); // html p element with class c1 hide

<h2>This is a heading</h2>
<div id="d1">Welcome to dotnetfunda</div>
<p>This is a paragraph.</p>
<p class="c1">This is another paragraph.</p>
<button>Click me</button>

Comments or Responses

Login to post response