How to get the element id/class from the dyanmic HTML using Jquery without any click event?

Viewed 28

I found many of the examples of event delegation where the event clicked is called to get the element from the dynamic HTML.

Following is the javascript snippet which gives me an element using its class of that already created html,

var el = document.querySelector('.scrollbar');
SimpleScrollbar.initEl(el);

The above code works well and gives me the element with class scrollbar.

However I am looking for something which gives me the element of dynamically appended html through jQuery using its class.

Thanks

0 Answers
Related