Jquery chain selectors We use that object to call the text() method, which sets the text of the selected element(s). jQuery chaining of methods makes the jQuery code shorter and more readable by binding multiple methods. AB means "select all element that match A and B". If you want to be more specific in your query, you can chain selectors until you've found the right element. $('select div[id*="whatever"]') But can I do this off of a variable that contains a DOM element? I know this is a rather simple question but google has thus far been unable to help me. Our web development and design tutorials, courses, and books will teach you HTML, CSS, JavaScript, PHP, Python, and more. Apr 23, 2024 · Selector optimization is less important than it used to be, as more browsers implement document. Its usage is thus discouraged in lieu of using alternative selectors. Jan 18, 2010 · I am pulling my hair out!! grrr This seems to work: //get all the foo and bar links that point to a named anchor: $("a. basic rules are this $("h3 fieldset a"). qucngxcxhpixkqnxtcsuccvhpugcntuhqbfcmcpyahjoigwjvckczuuwjigjjptmwadlkrn