Reputation: 28576
Is ready() for document only or i can use that function for other elements. Example below:
jQuery('.myclass').ready(function(){ alert('ready'); })
Upvotes: 3
Views: 264
Reputation: 1295
load() dont work in all elements, it is solely for img, iframe, document etc. ready() do work but inside function are failing
Upvotes: 0
Reputation: 10713
Yes, although I would recommend using .load()
$('#element').load(function() {
//do stuff!
});
Upvotes: 3