DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

AjayMalhotra
AjayMalhotra

Posted on

Add Dynamic Id to class with jquery

Hello to all, here is the code for add dynamic to div with jquery:

$("dic.class").attr("id", "yourIdName")
Enter fullscreen mode Exit fullscreen mode

Thank you.
https://therichpost.com

Top comments (1)

Collapse
 
link2twenty profile image
Andrew Bone

You can do it with pure JavaScript too, a lot of the older jQuery syntax has made it into mainstream JavaScript now πŸ™‚

document.querySelector('div.class').setAttribute('id', 'yourIdName');

An Animated Guide to Node.js Event Lop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.