Results 1 to 8 of 8

Thread: Slide Show Code

  1. #1

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Slide Show Code

    So Im googling for some simple code to throw on my website which is a hosted shopping cart solution. So I cant use .net or anything like that. Just some good ole html, javascript and css I would suppose would be the most widely compatible code.

    Lots of snippet sites but spent enough time reading through bs sites that dont deliver or have little to offer.

    Whats everyones favorite snippet site or such?

    Just looking for slide show with some control and autoplay

    Thanks
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Slide Show Code

    Maybe it's time to try jQuery and one of the plugins

    https://plugins.jquery.com/tag/slideshow/

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Slide Show Code

    Yea I suppose but I havent done any real web stuff in a while. Seems overkill? Theres no demo or preview of it?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Slide Show Code

    If you want simple to implement then skip the jQuery stuff - you would want to use it for other reasons (I do lots and lots of DOM changes and use jquery grids and datepickers and fancy stuff like animated graphs).

    Google for 10 BEST JAVASCRIPT SLIDESHOWS and see where that gets you - that's usually how I find my jQuery stuff.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  5. #5
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,753

    Re: Slide Show Code

    For shlits and giggles, I tried to make a slideshow and I'm fairly happy with it:

    HTML
    HTML Code:
    <div class="Slideshow">
    	<input checked="checked" class="SlideGroup" id="Group1" name="SlideGroup" type="radio" />
    	<label class="SlideHeader" for="Group1">Image1</label>
    	<img alt="image1" class="AccordionTab" src="http://lorempixel.com/400/200/cats" />
    	
    	<input class="SlideGroup" id="Group2" name="SlideGroup" type="radio" />
    	<label class="SlideHeader" for="Group2">Image2</label>
    	<img alt="image2" class="AccordionTab" src="http://lorempixel.com/400/200/sports" />
    	
    	<input class="SlideGroup" id="Group3" name="SlideGroup" type="radio" />
    	<label class="SlideHeader" for="Group3">Image3</label>
    	<img alt="image3" class="AccordionTab" src="http://lorempixel.com/400/200/people" />
    </div>
    CSS
    Code:
    .Slideshow *, .SlideGroup:checked + label, .SlideGroup:checked + label + img {
    	display: block;
    }
    .SlideGroup, .SlideGroup + label, .SlideGroup + label + img {
    	display: none;
    }
    .SlideGroup:checked + label {
    	background-color: rgb(40, 44, 47);
    	border-top-left-radius: 5px;
    	border-top-right-radius: 5px;
    	color: #fff;
    	-webkit-transition: all 0.2s;
    	-moz-transition: all 0.2s;
    	-ms-transition: all 0.2s;
    	-o-transition: all 0.2s;
    	transition: all 0.2s;
    }
    .SlideHeader:hover {
    	background-color: rgb(40, 44, 47);
    	color: #fff;
    	-webkit-transition: all 0.2s;
    	-moz-transition: all 0.2s;
    	-ms-transition: all 0.2s;
    	-o-transition: all 0.2s;
    	transition: all 0.2s;
    }
    .SlideHeader {
    	background-color: #fff;
    	border: 1px solid #ccc;
    	color: #000;
    	cursor: pointer;
    	padding-left: 1em;
    	padding-top: 1em;
    }
    .Slideshow img {
    	background-color: #fff;
    	border: 1px solid #ccc;
    }
    JavaScript
    Code:
    var index = 0;
    var radios = ["Group1", "Group2", "Group3"];
    window.onload = function () {
    	slide();
    };
    
    function slide() {
    	index++;
    	if (index > radios.length - 1) {
    		index = 0;
    	}
    	document.getElementById(radios[index]).checked = true;
    	setTimeout("slide()", 1750);
    }
    Fiddle
    http://jsfiddle.net/6L4wjpyc/

    It can be improved on by far, but it's something.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  6. #6

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Slide Show Code

    Quote Originally Posted by szlamany View Post
    If you want simple to implement then skip the jQuery stuff - you would want to use it for other reasons (I do lots and lots of DOM changes and use jquery grids and datepickers and fancy stuff like animated graphs).

    Google for 10 BEST JAVASCRIPT SLIDESHOWS and see where that gets you - that's usually how I find my jQuery stuff.
    Thanks! I googled and would get all kinds of lame results. Trying not to have any dependancies as I cannot upload any third party dlls.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Slide Show Code

    Quote Originally Posted by dday9 View Post
    For shlits and giggles, I tried to make a slideshow and I'm fairly happy with it:

    HTML
    HTML Code:
    <div class="Slideshow">
    	<input checked="checked" class="SlideGroup" id="Group1" name="SlideGroup" type="radio" />
    	<label class="SlideHeader" for="Group1">Image1</label>
    	<img alt="image1" class="AccordionTab" src="http://lorempixel.com/400/200/cats" />
    	
    	<input class="SlideGroup" id="Group2" name="SlideGroup" type="radio" />
    	<label class="SlideHeader" for="Group2">Image2</label>
    	<img alt="image2" class="AccordionTab" src="http://lorempixel.com/400/200/sports" />
    	
    	<input class="SlideGroup" id="Group3" name="SlideGroup" type="radio" />
    	<label class="SlideHeader" for="Group3">Image3</label>
    	<img alt="image3" class="AccordionTab" src="http://lorempixel.com/400/200/people" />
    </div>
    CSS
    Code:
    .Slideshow *, .SlideGroup:checked + label, .SlideGroup:checked + label + img {
    	display: block;
    }
    .SlideGroup, .SlideGroup + label, .SlideGroup + label + img {
    	display: none;
    }
    .SlideGroup:checked + label {
    	background-color: rgb(40, 44, 47);
    	border-top-left-radius: 5px;
    	border-top-right-radius: 5px;
    	color: #fff;
    	-webkit-transition: all 0.2s;
    	-moz-transition: all 0.2s;
    	-ms-transition: all 0.2s;
    	-o-transition: all 0.2s;
    	transition: all 0.2s;
    }
    .SlideHeader:hover {
    	background-color: rgb(40, 44, 47);
    	color: #fff;
    	-webkit-transition: all 0.2s;
    	-moz-transition: all 0.2s;
    	-ms-transition: all 0.2s;
    	-o-transition: all 0.2s;
    	transition: all 0.2s;
    }
    .SlideHeader {
    	background-color: #fff;
    	border: 1px solid #ccc;
    	color: #000;
    	cursor: pointer;
    	padding-left: 1em;
    	padding-top: 1em;
    }
    .Slideshow img {
    	background-color: #fff;
    	border: 1px solid #ccc;
    }
    JavaScript
    Code:
    var index = 0;
    var radios = ["Group1", "Group2", "Group3"];
    window.onload = function () {
    	slide();
    };
    
    function slide() {
    	index++;
    	if (index > radios.length - 1) {
    		index = 0;
    	}
    	document.getElementById(radios[index]).checked = true;
    	setTimeout("slide()", 1750);
    }
    Fiddle
    http://jsfiddle.net/6L4wjpyc/

    It can be improved on by far, but it's something.
    Yea thats the basics and like what I would find but I need bullets, controls, links and pause on mouseover

    Thats a nice online ide site for js!
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,753

    Re: Slide Show Code

    Quote Originally Posted by RobDog888 View Post
    Yea thats the basics and like what I would find but I need bullets, controls, links and pause on mouseover

    Thats a nice online ide site for js!
    I done did s'more diggin and I found this: http://jsfiddle.net/hellosze/mU2h9/

    It pauses on hover and gives the user the option to chose the desired picture too.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width