ID is an attribute, you can set it with the attr function:
I’m not sure what you mean about adding IDs since an element can only have one identifier and this identifier must be unique.
More Related Contents:
- How can I get the ID of an element using jQuery?
- 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 do I access style properties of pseudo-elements with jQuery? [duplicate]
- jQuery dot in ID selector? [duplicate]
- What is the fastest method for selecting descendant elements in jQuery?
- jQuery :contains() selector uppercase and lower case issue
- fullcalendar multiple cell select on mobile device?
- jQuery Set Select Index
- How can I exclude $(this) from a jQuery selector?
- Using jquery to get all checked checkboxes with a certain class name
- jQuery : eq() vs get()
- jQuery selector for the label of a checkbox
- jQuery select by attribute using AND and OR operators
- Target elements by class prefix
- Difference between CSS selector and jQuery filter?
- jQuery hasClass() – check for more than one class
- Changing the child element’s CSS when the parent is hovered
- How to detect if a browser is Chrome using jQuery?
- jQuery mobile- For every live tap event should there be an equivalent click event?
- jquery select siblings ‘until’
- Get the selected option id with jQuery
- What JQuery selector excludes items with a parent that matches a given selector?
- Cleanest way to get the next sibling in jQuery
- Performance differences between using “:not” and “.not()” selectors?
- jQuery selector where text = some value
- jquery filtering has + not