Switch to full style
JQuery Examples
Post a reply

Hide elements by class selector

Sat Dec 29, 2012 1:33 pm

Hide HTML elements by class selector in JQuery
Code:

<html>

<
head>
<
title>class selector usage</title>
<
script src="jquery-1.8.3.js"></script>
<script>
// Waits until the all document is loaded.
$(document).ready(function(){
// Do something when any button is clicked
  $("button").click(function(){
  // Hide any element with class big
    $(".big").hide();
  });
}); 

</script>

</head>
<body>

<textarea rows="5" cols="12" class="big" >
This textarea wil be hidden after you click hide buttton.
</textarea>
<textarea rows="3" cols="10" class="small" >
Normal textarea with anytext.
</textarea>
<p  class="big"> this will be hidden </p>
<input type="text" value="Text value" class="big">
  <button >Hide</button>

</body>
</html>




Post a reply
  Related Posts  to : Hide elements by class selector
 id Selector with paragraph     -  
 Hide the content of the div     -  
 hide cell in table     -  
 hide paragraph using jquery     -  
 How can i hide all topics from Guests ?     -  
 Hide HTML Div using JavaScript     -  
 Hide the background image by one click     -  
 I want to hide add to cart button for guest users. Need help     -  
 Hide, show and toggle effects with speed control     -  
 Define class helper class to check the method existance     -  

Topic Tags

JQuery Hide, JQuery Selector