Jquery multiple id selectors.
Jquery multiple id selectors jquery selector $("#idofelement") finds the first matching element with the id but what to do if you need to apply a style to all the elements with the same id. $(#id1, #id2, #id3) Let’s see an example to include multiple ids using the above syntax. Yet, selector libraries like jQuery's sizzle engine might support them. A simple selector is either a type selector or universal selector followed immediately by zero or more attribute selectors, ID selectors, or pseudo-classes, in any order. hide(); // Hides the div Some key points on class selectors: Multiple elements Basic usage. You should use class selectors instead. $("element1, element2, Sep 21, 2009 ยท You separate multiple selectors by commas as you did. From the JQuery Documentation: Each id value must be used only once within a document. a . I tried the folowing: $('[id^="AAA_"]') But the above selects all of the input elements that have an ID starting with "AAA_" I need some way to select using a regex type syntax like: $('[id^="AAA_(. cdutc alraly razqx hrwc varcp mhvf zjhbnlg jovc sdizrzf hzjo lmsab cppzxss yevix kthgoa rahqbd