sachinchoolur / lightslider

JQuery lightSlider is a lightweight responsive Content slider with carousel thumbnails navigation
http://sachinchoolur.github.io/lightslider/
MIT License
2.04k stars 1.52k forks source link

Last item not shown #419

Open batobolg opened 5 years ago

batobolg commented 5 years ago

when i test this code last item sometimes not shown. !!

   $(document).ready(function() {
        $("#content-slider").lightSlider({
            item:4,
            autoWidth:true,
            loop:false,
            keyPress:true,
            slideMargin: 1,
            controls: false,
            pager: false
            });
        });
    </script>
</head>
<body>
    <div class="demo">
        <div class="item">
            <ul id="content-slider" class="content-slider">
                <li>
                    <h3>1fsdfasdfasfas</h3>
                </li>
                <li>
                    <h3>2 fasdfasdfasdfasdfasdf asdfasdfasdfasdfasdfasdf</h3>
                </li>
                <li>
                    <h3>3</h3>
                </li>
                <li>
                    <h3>4 fasdfasdfasdfasdfasdf asdfasdfasdfasdfasdfasdf</h3>
                </li>
                <li>
                    <h3>5</h3>
                </li>
                <li>
                    <h3>6</h3>
                </li>
            </ul>
        </div>

    </div>  
</body>`
batobolg commented 5 years ago

IE11 always , chrome when resize sometimes shown sometimes not.

MohsEin07 commented 4 years ago

Having same issue. Did you get any solution?

batobolg commented 4 years ago

No, I am just don't using this product anymore. Just handwrite my own.

amiresp commented 4 years ago

its worked for me : seTimeout(()=>{ $("#content-slider").lightSlider({ item:4, autoWidth:true, loop:false, keyPress:true, slideMargin: 1, controls: false, pager: false }); },500) if not working this; change 500

patrickufer commented 4 years ago

https://github.com/sachinchoolur/lightslider/pull/318 This fixed the problem for me