How to set width 100% in percentage in jquery

jQuery(document).ready(function($) {

    $(".slider").slideshow({
        width: 1920,
        height: 710,
        transition: 'SquareRandom'
    });
    $(".caption").fadeIn(500);

    // playing with events:

    $(".slider").bind("sliderChange", function (event, curSlide) {
        $(curSlide).children(".caption").hide();
    });

    $(".slider").bind("sliderTransitionFinishes", function (event, curSlide) {
        $(curSlide).children(".caption").fadeIn(500);
    });
});

I am using this code for my complete page slider i want to rotate my full page with logo and mwnues and here in this code i have fixed height and width i dont want to make it fixed i want to it 100%.

Answers 1

  • Try

    $('.slider').css('width', '');
    

    Remove the width property give the element full width with its container


Related Articles