Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Carousel

New Here ,
Dec 15, 2016 Dec 15, 2016

The carousel is not rotating. It's just a picture and numbers. I have a picture and the code. Could anyone help? It looks fine in dreamweaver but this is what I get online.

carousel.jpgcarousel code.jpgcarousel code2.jpg

2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 16, 2016 Dec 16, 2016

Nancy OShea wrote:

Osgood's answer uses an HTML5 document with the Cycle 2 plugin.

I have not tested Cycle 2 in an X/HTML4 document. I suspect it might work OK, but those data attributes would definitely throw validation errors in anything other than an HTML5 document.

Yes, it works in a html4 document. I've 'cleaned' it up - only 5 errors, the data attributes - they can be ignored.

<!------HTML 4 VERSION ------------>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

...
Translate
Community Expert ,
Dec 15, 2016 Dec 15, 2016

Please post a link to your page in progress, unfortunately pictures of snippets of code won't suffice.

If you can't upload your page to a test location on a server you control and post a link to it here, a distant second would be to copy/paste the entire code of the page into the forum (don't use email, the code won't come through).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2016 Dec 15, 2016

So I think I have the fix and now all of my pictures just show-up as an jpeg image thumbnail. Not the picture the symbol of a picture!!! What the heck is going on!!!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

It's really simple. In code view, replace all the placeholder images in my code with your own images.  

<img src="http://lorempixel.com/1180/400/technics/4" alt="...">

<img src="http://lorempixel.com/1180/400/technics/3" alt="...">

<img src="http://lorempixel.com/1180/400/technics/2" alt="...">

<img src="http://lorempixel.com/1180/400/technics/1" alt="...">

Note.  You must be working in a defined local site folder.  If not, DW cannot properly manage assets for you.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2016 Dec 15, 2016

I have a huge website that was never an issue editing until I got this new software and tried to put in this damn carousel that I have been told needs to be on the website. Can what you gave me be put into my code I already have for the index page? If so where would it go?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

What's the URL to your site? I need to see what you're working with.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2016 Dec 15, 2016

turningpointsystemsgroup.com

Now none of the pictures I have used for months will show up. They are just blocks like this:

image wrong.jpg

Everything has been going insane with this software as soon as I published it to the internet!

It's completely different from CS3 to upload, and I have all of these _note files that keep showing up and causing issues with Putting pages up. I swear I never had this many issues I've been updating this site for years! Half the pages I made, just not the css and bones of the website.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

Don't blame the editor.  You have some critical code errors than need immediate attention. 

[Invalid] Markup Validation of http://turningpointsystemsgroup.com/ - W3C Markup Validator

You can also check your HTML code in DW by going to Window > Results > Validation.

Click on the large triangle to check current document.   Repeat for other site pages.

In CS3, you could get away with sloppy code. But not anymore.  DW expects you to use good code because modern browsers don't forgive code errors like they used to.

Now as for the original question about the Carousel Slider.  You need an HTML5 document type (the current web standard) to use this carousel.  But you're still using XHTML doc ttype.   So what do you want to do?

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2016 Dec 16, 2016

How do I make my document HTML5? Am I going to have to start over???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2016 Dec 16, 2016

Turning Turtle wrote:

How do I make my document HTML5? Am I going to have to start over???

Changing document types is fairly easy.  But you need to update your code syntax to match the new doc type.   You can read more about it below:

HTML5 Introduction

HTML5 New Elements

HTML5 Migration from HTML4

At some point, you will want to switch over to HTML5 though as it is the current standard and you can do much more with it than you could in old x/html. 

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2016 Dec 16, 2016

Thank you on this aspect of my issues! Do you know if any of this would be affecting the carousel aspect? I guess I'm just being dense or just overwhelmed with everything else EOY going on but I still don't see what is wrong with what I have versus everyone else.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

First you will need to fix the location of the JS files. Neither of the two below can be found

<script src="../js/jquery-1.11.3.min.js" type="text/javascript"></script>

<script src="../js/bootstrap.js" type="text/javascript"></script>

Eiter you have not uploaded the files or they have been uploaded into a different location. After you have fixed that, come back here with remaining problems.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2016 Dec 16, 2016

I have the two JS files showing in dreamweaver. Why would they not be uploaded?

js.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2016 Dec 16, 2016

How efficient are you when copying code and transferring it across to your page. Below is some simple code for a carousel - you just need to swap the images for your own images.

<!doctype html>

<html>

<head>

<title>Cycle2 Carousel Pager</title>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

<script src="http://malsup.github.io/jquery.cycle2.js"></script>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

</head>

<body>

<style>

* {

box-sizing: border-box;

}

.slideshow {

position: relative;

width: 50%;

max-width: 600px;

margin: 0 auto;

}

.cycle-slideshow img {

width: 100%;

height: auto;

display: block;

}

.controls {

position: absolute;

top: 45%;

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-pack: justify;

-ms-flex-pack: justify;

justify-content: space-between;

width: 100%;

z-index: 2;

}

.cycle-1  {

position: relative;

z-index: 1;

}

.cycle-1 div {

width:100%;

}

.controls em {

font-size: 30px;

padding: 10px 15px;

background-color: rgba(0, 0, 0, 0.6);

color: #fff;

}

.controls em:hover {

background-color: rgba(0, 0, 0, 0.4);

}

</style>

<div class="slideshow">

<div class="controls">

<a href="#" class="cycle-prev"><em class="fa fa-angle-left" aria-hidden="true"></em></a>

<a href="#" class="cycle-next"><em class="fa fa-angle-right" aria-hidden="true"></em></a>

</div>

<!-- end controls -->

<div class="cycle-1 cycle-slideshow"

data-cycle-slides="> div"

data-cycle-timeout="0"

data-cycle-prev=".slideshow .cycle-prev"

data-cycle-next=".slideshow .cycle-next"

>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196575.jpg"> </div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/monarch_butterfly_on_flower_196546.jpg"></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196576.jpg"></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_flower_01_hd_pictures_166973.jpg"></div>

</div>

<!-- end cycle-1 -->

</div>

<!-- end slideshow -->

</body>

</html>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2016 Dec 16, 2016

Osgood's answer uses an HTML5 document with the Cycle 2 plugin. 

I have not tested Cycle 2 in an X/HTML4 document.  I suspect it might work OK, but those data attributes would definitely throw validation errors in anything other than an HTML5 document.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2016 Dec 16, 2016

I will get it changed to HTML5 on Monday and test out what osgood gave me! Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2016 Dec 16, 2016

Nancy OShea wrote:

Osgood's answer uses an HTML5 document with the Cycle 2 plugin.

I have not tested Cycle 2 in an X/HTML4 document. I suspect it might work OK, but those data attributes would definitely throw validation errors in anything other than an HTML5 document.

Yes, it works in a html4 document. I've 'cleaned' it up - only 5 errors, the data attributes - they can be ignored.

<!------HTML 4 VERSION ------------>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Cycle2 Carousel Pager</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

<script type="text/javascript" src="http://malsup.github.io/jquery.cycle2.js"></script>

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>

<style type="text/css">

* {

box-sizing: border-box;

}

.slideshow {

position: relative;

width: 50%;

max-width: 600px;

margin: 0 auto;

}

.cycle-slideshow img {

width: 100%;

height: auto;

display: block;

}

.controls {

position: absolute;

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-pack: justify;

-ms-flex-pack: justify;

justify-content: space-between;

width: 100%;

z-index: 2;

top: 50%;

transform: translateY(-50%);

}

.cycle-1  {

position: relative;

z-index: 1;

}

.cycle-1 div {

width:100%;

}

.controls em {

font-size: 30px;

padding: 10px 15px;

background-color: rgba(0, 0, 0, 0.6);

color: #fff;

}

.controls em:hover {

background-color: rgba(0, 0, 0, 0.4);

}

</style>

</head>

<body>

<div class="slideshow">

<div class="controls">

<a href="#" class="cycle-prev"><em class="fa fa-angle-left" aria-hidden="true"></em></a>

<a href="#" class="cycle-next"><em class="fa fa-angle-right" aria-hidden="true"></em></a>

</div>

<!-- end controls -->

<div class="cycle-1 cycle-slideshow"

data-cycle-slides="> div"

data-cycle-timeout="4000"

data-cycle-prev=".slideshow .cycle-prev"

data-cycle-next=".slideshow .cycle-next"

>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196575.jpg" alt=""/> </div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/monarch_butterfly_on_flower_196546.jpg" alt=""/></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196576.jpg" alt=""/></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_flower_01_hd_pictures_166973.jpg" alt=""/></div>

</div>

<!-- end cycle-1 -->

</div>

<!-- end slideshow -->

</body>

</html>

<!------HTML 5 VERSION ------------> (now no validation errors - if that troubles some people)

<!DOCTYPE html>

<html>

<head>

<title>Cycle2 Carousel Pager</title>

<meta charset="UTF-8">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

<script src="http://malsup.github.io/jquery.cycle2.js"></script>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

<style>

* {

box-sizing: border-box;

}

.slideshow {

position: relative;

width: 50%;

max-width: 600px;

margin: 0 auto;

}

.cycle-slideshow img {

width: 100%;

height: auto;

display: block;

}

.controls {

position: absolute;

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-pack: justify;

-ms-flex-pack: justify;

justify-content: space-between;

width: 100%;

z-index: 2;

top: 50%;

transform: translateY(-50%);

}

.cycle-1  {

position: relative;

z-index: 1;

}

.cycle-1 div {

width:100%;

}

.controls em {

font-size: 30px;

padding: 10px 15px;

background-color: rgba(0, 0, 0, 0.6);

color: #fff;

}

.controls em:hover {

background-color: rgba(0, 0, 0, 0.4);

}

</style>

</head>

<body>

<div class="slideshow">

<div class="controls">

<a href="#" class="cycle-prev"><em class="fa fa-angle-left" aria-hidden="true"></em></a>

<a href="#" class="cycle-next"><em class="fa fa-angle-right" aria-hidden="true"></em></a>

</div>

<!-- end controls -->

<div class="cycle-1 cycle-slideshow"

data-cycle-slides="> div"

data-cycle-timeout="4000"

data-cycle-prev=".slideshow .cycle-prev"

data-cycle-next=".slideshow .cycle-next"

>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196575.jpg" alt=""> </div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/monarch_butterfly_on_flower_196546.jpg" alt=""></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196576.jpg" alt=""></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_flower_01_hd_pictures_166973.jpg" alt=""></div>

</div>

<!-- end cycle-1 -->

</div>

<!-- end slideshow -->

</body>

</html>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2016 Dec 16, 2016

Just so I'm clear, in an existing webpage I would need to put this:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

<script type="text/javascript" src="http://malsup.github.io/jquery.cycle2.js"></script>

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>

<style type="text/css">

* {

box-sizing: border-box;

}

.slideshow {

position: relative;

width: 50%;

max-width: 600px;

margin: 0 auto;

}

.cycle-slideshow img {

width: 100%;

height: auto;

display: block;

}

.controls {

position: absolute;

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-pack: justify;

-ms-flex-pack: justify;

justify-content: space-between;

width: 100%;

z-index: 2;

top: 50%;

transform: translateY(-50%);

}

.cycle-1  {

position: relative;

z-index: 1;

}

.cycle-1 div {

width:100%;

}

.controls em {

font-size: 30px;

padding: 10px 15px;

background-color: rgba(0, 0, 0, 0.6);

color: #fff;

}

.controls em:hover {

background-color: rgba(0, 0, 0, 0.4);

}

In the css section... and this:

<div class="slideshow">

<div class="controls">

<a href="#" class="cycle-prev"><em class="fa fa-angle-left" aria-hidden="true"></em></a>

<a href="#" class="cycle-next"><em class="fa fa-angle-right" aria-hidden="true"></em></a>

</div>

<!-- end controls -->

<div class="cycle-1 cycle-slideshow"

data-cycle-slides="> div"

data-cycle-timeout="4000"

data-cycle-prev=".slideshow .cycle-prev"

data-cycle-next=".slideshow .cycle-next"

>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196575.jpg" alt=""/> </div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/monarch_butterfly_on_flower_196546 .jpg" alt=""/></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_on_flower_196576.jpg" alt=""/></div>

<div><img src="http://images.all-free-download.com/images/graphiclarge/butterfly_flower_01_hd_pictures_16 6973.jpg" alt=""/></div>

</div>

<!-- end cycle-1 -->

</div>

<!-- end slideshow -->

In the section where the slideshow needs to be on the page, correct? I'm sorry I'm being a big pain in the butt.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2016 Dec 16, 2016

Yes the first section goes between the <head></head> tags - dont forget to include the closing </style> tag.

You could link to the css styles via an external style sheet if you wish to.

The second section of code goes in the container you have allocated for your carousel.

You would need to change the 'slideshow' css from:

.slideshow {

position: relative;

width: 50%;

max-width: 600px;

margin: 0 auto;

}

To as below, as the container you have allocated for the carousel would be the width and 'slideshow' would take up the whole width by default.

.slideshow {

position: relative;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2016 Dec 16, 2016
LATEST

All correct except for one thing.  GitHub is not a CDN.  It's a script repository.  As such the script on their site  lacks proper headers and may not work in all browsers.   For best results, don't use this:

<script type="text/javascript" src="http://malsup.github.io/jquery.cycle2.js"></script>

Use this one from Cloudflare -- an official content distribution network.

<!--Cycle2 Plugin-->

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/core/jquery.cycle2.core.min.js"></script>

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines