Posted on 19th May 2024
Adding an attribute in jQuery is very simple you can use the following syntax
$(‘div.special’).attr(‘id’, ‘value_of_your_id’);
If you are looking for the Jquery certification course, you can check out this online Jquery Training and Improve your knowledge in Jquery.
STILL GOT QUERIES?