Skip to content
Advertisement

Creating element with a class

This line of code is not working, how can I create a DOM element and adding it a class instantly?

JavaScript

Advertisement

Answer

You could use just jQuery for this :

JavaScript

Hope this helps.

Advertisement