anand
anand

Reputation: 11

How to chage width 1024px to 100% in js script

<script>    
$(function(){
  var slider = new BeaverSlider({
    structure: {
      container: {
        id: "my-slider",
        width: '1024',
        height: 520,

      }
    },
    content: {
      images: [
        "images/slider/1.jpg",
        "images/slider/2.jpg",
        "images/slider/3.jpg",
        "images/slider/4.jpg",
        "images/slider/5.jpg",

        "images/slider/7.jpg",
        "images/slider/8.jpg",
      ]
    },
    animation: {
      effects: effectSets["slider: big set 2"],
      interval: 1000
    }
  });   
}); 
</script>

Upvotes: 1

Views: 209

Answers (2)

AncientWings
AncientWings

Reputation: 1

Just change:

    id: "my-slider", width: '1024'

to:

    id: "my-slider", width: '100%'

???

Upvotes: 0

Snake Eyes
Snake Eyes

Reputation: 16764

You can try with screen.width instead of 100% that you asked.

...
   width: screen.width,
...

Upvotes: 1

Related Questions