ml92 ml92 - 3 months ago 5
jQuery Question

Why I can't check is div element loaded

How to check is DIV element loaded, I tried using this code

$(document).ready(function() {
$('.slajder').loaded(function() {
$('.carousel-caption').addClass('left-animation');
});
}


Therefore, when my slide box DIV called .slajder loaded full 100%, I want to add class left-animation

Answer

You can check div element loading like this also

 if($('.slajder').length > 0){
  // Do something
   }