Jump to content

Search the Community

Showing results for tags 'image slideshow'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. On the tutorial for an image gallery slideshow (https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp) the example starts with the first image enlarged. The code they provided doesn't apply that to my website, I have to select an image to enlarge it, is there something I can add? Thanks
  2. The code provided for 'Javascript Automatic Image Slideshow' code is weak and not optimal. It is bit confusing and does n't reflect the best of W3schools. Please check the link attached here(http://www.w3schools.com/w3css/w3css_slideshow.asp) I suggest an edit. Please compare the current code shown in w3schools(1) and my edited code(2): 1. ------------------------------------------------------------------------------------------------------------------------------------------------------------------ <script> var myIndex = 0; carousel(); function carousel() { var i; var x = document.getElementsByClassName("mySlides"); for (i = 0; i < x.length; i++) { x.style.display = "none"; } myIndex++; if (myIndex > x.length) {myIndex = 1;} x[myIndex-1].style.display = "block"; setTimeout(carousel, 2000); // Change image every 2 seconds } </script> ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 2. <script> var myIndex = 0; var x = document.getElementsByClassName("mySlides"); carousel(); function carousel() { if(myIndex!=0){x[myIndex-1].style.display="none";} if (myIndex > (x.length-1)) {myIndex = 0} x[myIndex].style.display = "block"; myIndex++; setTimeout(carousel, 2000); // Change image every 2 seconds } </script> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
×
×
  • Create New...