select a form by name jquery
var frm = $('form[name="frmSave"]');
select a form by name jquery
var frm = $('form[name="frmSave"]');
jquery selector this and class
$(".class").click(function(){
$(this).find(".subclass").css("visibility","visible");
});
jquery find tag and class
$(".txtClass") => getElementsByClassName()
$("#childDiv2 .txtClass") => getElementById(),
then getElementsByClassName()
$("#childDiv2 > .txtClass") => getElementById(),
then iterate over children and check class
$("input.txtClass") => getElementsByTagName(),
then iterate over results and check class
$("#childDiv2 input.txtClass") => getElementById(),
then getElementsByTagName(),
then iterate over results and check class
selector in jquery
$("*") // all elements
$("p.demo") // <p> elements with class="intro"
$("p:first") // the first <p> element
$("p span") // span, descendant of p
$("p > span") // span, direct child of p
$("p + span") // span immediately proceeded by a p
$("p ~ span") // strong element proceeded by p
$("ul li:first") // the first <li> element of the first <ul>
$("ul li:first-child") // the first <li> element of every <ul>
$("ul li:nth-child(3)") // third child
$("[href]") // any element with an href attribute
$("a[target='_blank']") // <a> elements with a target "_blank" attribute
$("a[target!='_blank']") // <a> elements with a target attribute value other than "_blank"
$(":input") // all form elements
$(":button") // <button> and <input> elements of type="button"
$("tr:even") // even <tr> elements
$("tr:odd") // odd <tr> elements
$("span:parent") // element which has child element
$("span:contains('demo')") // element conaining the specified text
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us