How to find an element or tag using Jquery

The HTML is here: <table class=”table”> <caption>My testing Table</caption> <tr> <td class=””><span>data-1</span></td> <td>data-2</td> </tr> <tr> <td>data-3</td> <td><span>data-4</span></td> </tr> </table> The Script is: // ONLINE JQUERY LIBRARY IS CONNECTED <script src=”https://code.jquery.com/jquery-1.10.2.js”></script> <script> $(document).ready(function() { // FINDS SPAN TAG IN CLASS TABLE AND CHANGE ITS CSS STYLE $(“.table”).find(“span”).css({“color”:”blue”,”background”:”lightpink”}); }); </script> For any reference visit: http://www.w3schools.com/jquery/traversing_find.asp

on check select all checkboxs in jquery

HTML Code is <div> Select All <input type=”checkbox” name=”select_all” id=”select_all”> </div> <div> <table id=”Optiontable”> <tr> <td> <input type=”checkbox” name=”checkRow” id=”checkRow” value””> Select-1 </td> </tr> <tr> <td> <input type=”checkbox” name=”checkRow” id=”checkRow” value=””> Select-2 </td> </tr> <tr> <td> <input type=”checkbox” name=”checkRow” id=”checkRow” value=””> Select-3 <td> </tr> </table> </div> Script Code:: <script> $(document).ready(function() { $(‘#select_all’).on(‘click’, function() { if … Read moreon check select all checkboxs in jquery

How to post with out refreshing the page

Ajax POST format: request is post to register.php page. All the database insert , update query is written there. connect with jquery library online using– <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script> Method-1: var myemail = $(“#email”).val(); var mypass = $(“#pass”).val(); var datastring = {’email’:myemail, ‘pass’: mypass }; // AJAX METHOS IS CALLED $.ajax({ url:”register.php”, type:”post”, data: datastring, success:function(data){ alert … Read moreHow to post with out refreshing the page

How to post using ajax

Here is the ajax format to post a request without refresh the page. var datastring = {‘name’:name, ’email’:email, ‘phone’:phone }; $.ajax({ url:”register.php”, type:”post”, data: datastring, }) register.php is the target page, where to send post request using ajax.

Submit Register Form without refreshing the page

<!—- index.php page—-> <html> <body> <!——making jquery library’s link —> <script src=”//code.jquery.com/jquery-1.10.2.js”></script> <script> function validate() { //——–value of fields ——— var name = document.getElementById(“name”).value; var email = document.getElementById(“email”).value; var phone = document.getElementById(“phone”).value; //—— error fields are identified first ——– var error_name_id = document.getElementById(“error_name”); var error_email_id = document.getElementById(“error_email”); var error_phone_id = document.getElementById(“error_phone”); var error_msg = document.getElementById(“error_msg”); … Read moreSubmit Register Form without refreshing the page