0

I have an image slider on my page:
That is my call:

<div id="slider">
    <ul class="bjqs">
        <li ng-repeat="image in dealer.images"><img src="{{image}}" alt="{{image}}" /></li>   
    </ul>
</div>

Somehow the slider doesn't work. I think I have to load the jQuery init after the images are loaded.
This is the call for the slider:

$('#slider').bjqs({
            height      : 420,
            width       : 130,
            responsive  : true
          });  

How can I call this function after the images are loaded?

4

1 回答 1

1

如果您确定这是问题所在,则可以使用Nick Craver 的解决方案

$(".bjqs img").one('load', function() {
   $('#slider').bjqs({
       height      : 420,
       width       : 130,
       responsive  : true
   });  
}).each(function() {
   if(this.complete) $(this).load();
});
于 2013-01-07T01:46:28.820 回答