BJQS multiple slider instances when resizing a window

I want to resize the bjqs slider when resizing a window.

this is what i have so far:

<script type="text/javascript"> $(document).ready(function() { $(window).resize(function(){ $('.pagebg').bjqs({ height : 347, width : $(window).width(), showcontrols : false, showmarkers : false, }); }); }); </script> 

I tried resizing it using $ (window) .resize, but there are several instances that do

Does anyone know how I can resize it and save only one instance?

+6
source share
1 answer

Without using the window resize event, you can define a slider with the 100% width option, for example:

 $(function () { $('#dialog').bjqs({ 'showmarkers': false, 'responsive': true, 'width': '100 %', 'automatic': true }); }); 

Thus, it will automatically respond without processing its size.

Demo: http://jsfiddle.net/IrvinDominin/MADrg/

0
source

Source: https://habr.com/ru/post/952212/


All Articles