Jump to content

Manual Slideshow > Multiple Slideshows Issue


habreu
 Share

Recommended Posts

I am using the Manual Slideshow found on this page

 

https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_slideshow_two

 

and have 12 slideshows, each slideshow is in a tab (created using Dreamweaver's Jquery tab option). Clicking on a tab shows the appropriate slideshow. The first two slideshows work as expected but starting on the third slideshow the display: block; and display:none; is not inserted so all the slides are visible.

I was assuming there must be some place to set the number of slideshows but I can't figure out what it could be. I'm hoping it is simple as there are a lot of files and didn't want to burden anyone with a pile of code.

You help appreciated.

 

Burt

save1.jpg

save2.jpg

Link to comment
Share on other sites

Well I found an answer on the forums here http://w3schools.invisionzone.com/topic/58336-again-multiple-slideshows-on-same-html-page/?tab=comments#comment-320121

 

It might be worth commenting the code on the original article and mention the areas that need to be updated for the sake of others who stumble on this.

ie

var slideId = ["mySlides1", "mySlides2", "mySlides3", "mySlides4", "mySlides5",mySlides6",etc]

showDivs(1, 0);
showDivs(1, 1);
showDivs(1, 2);
showDivs(1, 3);
showDivs(1, 4);
showDivs(1, 5);

etc

  <button class="w3-button w3-black w3-display-left" onclick="plusDivs(-1, 0)">❮</button>
  <button class="w3-button w3-black w3-display-right" onclick="plusDivs(1, 0)">❯</button>
...
  <button class="w3-button w3-black w3-display-left" onclick="plusDivs(-1, 1)">❮</button>
  <button class="w3-button w3-black w3-display-right" onclick="plusDivs(1, 1)">❯</button>
...
  <button class="w3-button w3-black w3-display-left" onclick="plusDivs(-1, 2)">❮</button>
  <button class="w3-button w3-black w3-display-right" onclick="plusDivs(1, 2)">❯</button>
...
  <button class="w3-button w3-black w3-display-left" onclick="plusDivs(-1, 3)">❮</button>
  <button class="w3-button w3-black w3-display-right" onclick="plusDivs(1, 3)">❯</button>

etc

 

Thanks for the example though, worked like a charm. I was able to use it along with some jquery tabs and put together a little color chart the boss wanted

 

https://www.allfrom1supply.com/merchant2/includes/color/colorpicker.html

 

Edited by stormvisions
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...