6

I want to resize bjqs slider when the window resizes..

this is what i've got 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've tried to resize it using $(window).resize, but there are multiple instances running

does anyone know how I can resize it and keep only 1 instance running?

Irvin Dominin
  • 30,819
  • 9
  • 77
  • 111
user2703913
  • 121
  • 1
  • 9

1 Answers1

0

Without using window resize event you can define you slider with a width option of 100% like:

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

So it will be automatically responsive without handle its resize.

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

Irvin Dominin
  • 30,819
  • 9
  • 77
  • 111