bxslider calculating wrong viewport size on load

前端 未结 6 1519
醉梦人生
醉梦人生 2021-02-07 05:06

Anyway I recently started using bxslider and I\'m having an issue with it.

It seems to calculate its viewport size wrongly on page load, which means it doesn\'t work we

6条回答
  •  长发绾君心
    2021-02-07 06:12

    It could be that you're calling the bxSlider function too early. If you're invoking it from

    $(document).ready(function() { ... });

    consider instead using

    $(window).load(function() { ... });

    The difference between using those two functions is that (document).ready waits until the DOM has been shown to the user in it's initial state, whereas (window).load actually waits until all resources have been loaded onto the DOM.

提交回复
热议问题