I know I can access dynamic elements using an on click event like this:
$('body').on('click', '.el', function() { ...
but how can I get .el
on document load?
I tried for example:
$(document).ready( function() {
var test = $('.el').length;
})
But it returns 0.
.el
is loaded onto the page dynamically.. when the document loads. It is loaded through another js file which i don't have access to.