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?

1
  • 1
    Maybe ngSrc or this post can help? Commented Jan 7, 2013 at 4:03

1 Answer 1

1

If you are sure that's the problem than you can use Nick Craver's solution

$(".bjqs img").one('load', function() {
   $('#slider').bjqs({
       height      : 420,
       width       : 130,
       responsive  : true
   });  
}).each(function() {
   if(this.complete) $(this).load();
});
Sign up to request clarification or add additional context in comments.

2 Comments

Nope, this wasn't the solution. The slider still wants to load the angular scope : slider/%7B%7Bimage%7D%7D 404 (Not Found)
@Marek123, I think there is an error on image link, did you encode it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.