Use the attribute-starts-with selector:
$('[id^="content_"]').hide();
To limit the search to elements within extra_content
:
$('#extra_content [id^="content_"]').hide();
More Related Contents:
- jQuery selectors with variables
- How can I get the ID of an element using jQuery?
- jQuery Selector: Id Ends With?
- Select element by exact match of its content
- jquery data selector
- Sort divs in jQuery based on attribute ‘data-sort’?
- How can I change CSS display none or block property using jQuery?
- Set selected option of select box
- How to select last child element in jQuery?
- Get a list of checked checkboxes in a div using jQuery
- jQuery dot in ID selector? [duplicate]
- jQuery :contains() selector uppercase and lower case issue
- CSS selector case insensitive for attributes
- jQuery get all divs which do not have class attribute
- jQuery Set Select Index
- Difference between :hidden and :not(:visible) in jQuery
- How can I get the corresponding table header (th) from a table cell (td)?
- Select elements without any class [duplicate]
- jQuery attribute selector for multiple values
- jQuery: selector (classname with space)
- JQuery data selector not updating with .data
- :nth-of-type() in jQuery / Sizzle?
- jQuery hasClass() – check for more than one class
- Changing the child element’s CSS when the parent is hovered
- addID in jQuery?
- CSS selector to select an id with a slash in the id name?
- Using jQuery how do I select a range of rows?
- How to select a table column with jQuery
- Performance of jQuery selectors vs local variables
- Can jQuery selectors be used with DOM mutation observers?