PHP Developers Network
http://forums.devnetwork.net/

Need a left<>right gallery slider - can it be done in CSS?
http://forums.devnetwork.net/viewtopic.php?f=68&t=141379
Page 2 of 3

Author:  simonmlewis [ Tue Jun 09, 2015 10:13 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

No I don't think you realised what I am facing here.

NOTHING is working at all. Look at the attached. Whether I had auto play or not, I should at least have the styling and DIVs up on screen, and the dots below it.

Attachments:
ss.png
ss.png [ 16.85 KiB | Viewed 5916 times ]

Author:  Celauran [ Tue Jun 09, 2015 10:19 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

Have you checked that your CSS and JavaScript is loading? Refreshed them?
The exact code I'm using here:
Syntax: [ Download ] [ Hide ]
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>My Now Amazing Webpage</title>
    <link rel="stylesheet" type="text/css" href="slick/slick.css"/>
    <link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
</head>

<body>
    <div class="slider responsive">
        <div><h3>1</h3></div>
        <div><h3>2</h3></div>
        <div><h3>3</h3></div>
        <div><h3>4</h3></div>
        <div><h3>5</h3></div>
        <div><h3>6</h3></div>
        <div><h3>7</h3></div>
        <div><h3>8</h3></div>
    </div>

    <script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="slick/slick.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('.responsive').slick({
                dots: true,
                autoplay: true,
                infinite: false,
                speed: 1000,
                slidesToShow: 4,
                slidesToScroll: 4,
                responsive: [
                    {
                    breakpoint: 1024,
                        settings: {
                            autoplay: true,
                            speed: 300,
                            slidesToShow: 3,
                            slidesToScroll: 3,
                            infinite: true,
                            dots: true
                        }
                    },
                    {
                        breakpoint: 600,
                        settings: {
                            autoplay: true,
                            speed: 300,
                            slidesToShow: 2,
                            slidesToScroll: 2
                        }
                    },
                    {
                        breakpoint: 480,
                        settings: {
                            autoplay: true,
                            speed: 300,
                            slidesToShow: 1,
                            slidesToScroll: 1
                        }
                    }
                ]
            });
        });
    </script>
</body>
</html>

The output:

Attachments:
Screen Shot 2015-06-09 at 11.20.42 AM.png
Screen Shot 2015-06-09 at 11.20.42 AM.png [ 84.28 KiB | Viewed 5916 times ]
Screen Shot 2015-06-09 at 11.20.54 AM.png
Screen Shot 2015-06-09 at 11.20.54 AM.png [ 84.66 KiB | Viewed 5916 times ]
Screen Shot 2015-06-09 at 11.18.44 AM.png
Screen Shot 2015-06-09 at 11.18.44 AM.png [ 78.21 KiB | Viewed 5916 times ]

Author:  simonmlewis [ Tue Jun 09, 2015 10:23 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

The CSS is both loading, i see it in Web Developer "Edit CSS" in the footer.
And Javascript loads:
file:///C:/Users/Simon/Desktop/slider/slick/slick.min.js

You have my JS files in the ZIP I sent. I just do not get it.

I assume it's up to us to change the styling of the DIVs as they slide anyway.

Author:  simonmlewis [ Tue Jun 09, 2015 10:28 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

If you could ZIP what you have done, and send over, I'll see what happens this end.

Author:  Celauran [ Tue Jun 09, 2015 10:29 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS


Author:  Celauran [ Tue Jun 09, 2015 10:30 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

Yep, sure thing.

Attachments:
simon.zip [37.08 KiB]
Downloaded 233 times

Author:  simonmlewis [ Tue Jun 09, 2015 10:33 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

What I posted back as a screenshot, is how it looks when your code.
No I haven't touched CSS or JS. And I used your code. Hence why I am utterly stumped.

Author:  simonmlewis [ Tue Jun 09, 2015 10:35 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

I'm losing the will to live here - look at the attached.
I have touched nothing. I extracted ur files to my desktop, dragged the html to FF and there you go. File comment: How it looks with Outline Border Elements on
ss2.png
ss2.png [ 16.9 KiB | Viewed 5913 times ]

Author:  Celauran [ Tue Jun 09, 2015 10:36 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

Definitely something on your end, then, and not in the code itself. Clear cache, disable browser addons, try private mode / different browser.

Author:  simonmlewis [ Tue Jun 09, 2015 10:40 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

ss.png
ss.png [ 20.98 KiB | Viewed 5913 times ]

This is "In-Private Browsing", and still it does this.
I do use adblocker, but then if that blocks this, then there will be no point having it anyway.

Author:  simonmlewis [ Tue Jun 09, 2015 10:43 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

OR there any others that are good?

Author:  Celauran [ Tue Jun 09, 2015 10:46 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

Here's a question: have you actually run this from a web server rather than using file:/// ?

Author:  simonmlewis [ Tue Jun 09, 2015 10:46 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

You mean, have I hosted it live to see it like that?

Author:  Celauran [ Tue Jun 09, 2015 10:48 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

Or run it from WAMP/XAMPP/whatever. Can be on your local machine.

Author:  simonmlewis [ Tue Jun 09, 2015 10:49 am ]
Post subject:  Re: Need a left<>right gallery slider - can it be done in CS

Good thinking. Hold on. Give me 2 mins and I'll write back after uploading to a local site.

Page 2 of 3 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/