ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

jQuery Selectors

jquery-javascript selectorsThe jQuery selectors are used to select and manipulate HTML elements based on their classes, id, types, attributes etc. These selectors start with the dollar sign and parentheses. For instance, $().

These are the following examples to select HTML elements based on:

 

Select HTML elements based on element name.

$(document).ready(function(){
 $("button").click(function(){
  $(this).hide();
 });
});

 

Select HTML elements based on id. It is used to select the particular html element in the page. This symbol(#) is used at the beginning id of the element just like in <button id="button" ></button>

$(document).ready(function(){
 $("#button").click(function(){
  $(this).show();
 });
});

 

Select HTML elements based on class. It finds elements with a specific class and a period is written at the beginning of the class name for selection just like in <button class="button" ></button>.

$(document).ready(function(){
 $(".button").click(function(){
  $(this).toggled();
 });
});

 

For all students who need programmer for your thesis system or anyone who needs a sourcecode in any programming languages. You can contact me @:

 

Email – jannopalacios@gmail.com
Mobile No. – 09305235027 – tnt

Facebook Comments

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked *

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!