Thursday, May 25, 2017

12/05/2017

jquery selectors

☺jQuery selectors are one of the most important parts of the jQuery library.

☺All selectors in jQuery start with the dollar sign and parentheses: $(). 

1.Element selector
       $(document).ready(function(){
    $("button").click(function){
        $("p").hide();
    });
});


2.#id selector
       
  $(document).ready(function(){
    $("button").click(function(){
        $("#test").hide();
    });
});




 3.class selector
        $(document).ready(function(){
    $("button").click(function(){
        $(".test").hide();
    });
});
 

No comments:

Post a Comment

HTML introduction

HTML stands for Hyper Text Markup Language. HTML describes the structure of web page using markup. HTML elements are the building blo...