One button slider

Im building a folio site and i was wondering how would i get a slider that only uses one button, which when clicked the slider slides through a list of images and loops back to the start image when the end image is reached?

Hi there,

Welcome to the forums :slight_smile:

The easiest way to add an image slider to a web page (especially if you don’t have much experience with JS) is to use a plugin.
Here’s a recent list of good ones (including demos).
I would look for one that does what you want and use that.

If you need any help with the implementation, or really, absolutely, definitely need one that only has one button, then let us know and I’m sure we’ll be able to help.

Thank you for your reply, I would like to definitely have one button controlling the slider as its apart of the design of my folio site.

here is the link

I want to be able to click the light globe and then have the slider move to next image on each click until the last image then have it go back to the start image

You could adapt bxSlider to do that by manipulating the CSS. It’s my favorite slider.

Yeah, bxSlider seems a good choice.
Why don’t you implement that and let us know how you get on.

ill give the bx slider ago and ill let you guys know cheers

would it be possible to link one button to different sections using different id’s?

Sorry, I’m not really sure what you mean.
The best thing would be to implement the bxSlider with a few slides on the page you linked to, then we have some code to go on.

so like:

<section id=“one”> Page 1 </section>

<section id=“two”> Page 2 </section>

<section id=“three”> Page 3 </section>

<section id=“four” > Page 4 </section>

then link a button to loop through these four sections

Sorry, I’m still not really sure what you are aiming at.

The code is fine, but this sentence doesn’t really make much sense for me.

yeah im not sure of an easy way of explaining it, i just want to be able to click through different sections of the site using only one button, i think i may have to think of something else in terms of navigation

Well, if you just go ahead and add the bxSlider (with a few slides) to the page you linked to, that’ll give us more to go on.
I’m sure it won’t be too difficult to set it up as you require.

bxSlider, by default, has left/right buttons for scrolling the images right or left. My suggestion would be to keep only the right pointing button, but move it over far left, and style it to include the light bulb image. All that is easy with CSS, and you’d get the effect you were mentioning initially.

Here is the link with slider on the page, i want the light globe button on the left to be the slider button, thanks for your help

OK, see my post above yours (#13). I would style this button to include the lightbulb image and move it to the left:

<a class="bx-next" href="">Next</a>

As an example, I added in these styles to your page as an experiment:

.bx-wrapper .bx-next {
left: -350px !important;
top: 0 !important;
width: 260px !important; 
height: 666px !important;
background: url( no-repeat 0 0 !important;

.globe {
display: none;

I had to use !important to override your other styles, but you wouldn’t need them in the end.

cool thanks so much its working all i have to do now is get my hover affect working again i take it ill have to change it to .bx-next:hover ?

in principle

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="" xml:lang="en" lang="en">

<style type="text/css">

#tst {
  position:absolute;overflow:hidden;left:100px;top:100px;width:400px;height:300px;border:solid red 1px;

#tst IMG {

.slide {
  position:absolute;left:0px;top:0px;width:4000px;height:300px;border:solid red 1px;


<input type="button" name="" value="Next" onmouseup="zxcMultiSlider.Next('tst',1);"/>
<input type="button" name="" value="Back" onmouseup="zxcMultiSlider.Next('tst',-1);"/>
<input type="button" name="" value="Auto" onmouseup="zxcMultiSlider.Auto('tst');"/>
<input type="button" name="" value="Pause" onmouseup="zxcMultiSlider.Pause('tst');"/>
<input type="button" name="" value="GoTo 0" onmouseup="zxcMultiSlider.GoTo('tst',0);"/>
<input type="button" name="" value="GoTo 1" onmouseup="zxcMultiSlider.GoTo('tst',1);"/>
<input type="button" name="" value="GoTo 2" onmouseup="zxcMultiSlider.GoTo('tst',2);"/>
<input type="button" name="" value="SwapSlide 0" onmouseup="zxcMultiSlider.SwapSlide('tst',0);"/>
<input type="button" name="" value="SwapSlide 1" onmouseup="zxcMultiSlider.SwapSlide('tst',1);"/>

<div id="tst" >
 <div class="slide" >
  <img src="" alt="image" />
  <img src="" alt="image" />
  <img src="" alt="image" />
 <div class="slide" >
  <img src="" alt="image" />
  <img src="" alt="image" />
  <img src="" alt="image" />
  <img src="" alt="image" />

<script type="text/javascript">

var zxcMultiSlider={

  var o=this['zxc'+id];
  if (o&&o.ary[n]){

  var o=this['zxc'+id],ud=typeof(ud)=='number'&&ud<0?-1:1;
  if (o){

  var o=this['zxc'+id];
  if (o&&o.ary[o.n][2][n]){

  var o=this['zxc'+id],oop=this;
  if (o){{ oop.rotate(o,0,true); },ms||200);

  var o=this['zxc'+id];
  if (o){

  var id=o.ParentID,ms=o.Animate,h=o.AutoHold,srt=o.AutoStart,p=document.getElementById(id),clds=p.childNodes,ary=[],n=0,z0=0;
  for (;z0<clds.length;z0++){
   if (clds[z0].nodeType==1){

  var a=o.ary[o.n],lgth=a[2].length-1;;[1]+o.ud:null;
  this.animate(o,a[0],a[0][2],-a[2][n].offsetLeft,new Date(),;

  var oop=this,ms=new Date()-srt,n=(t-f)/mS*ms+f;
  if (isFinite(n)){
  if (ms<mS){
   a[4]=setTimeout(function(){ oop.animate(o,a,f,t,srt,mS); },10);
  else {


 ParentID:'tst',  // the unique Id name of the parent DIV.                     (string)
 Animate:1000,    //(optional) the animation duration in milli seconds.        (number, default = 1000)
 AutoHold:3000,   //(optional) the auto rotate 'hold' delay' in milli seconds. (number, default = 1000)
 AutoStart:1000   //(optional) the auto start delay' in milli seconds.         (number, default = no auto start)



Yes, that would work nicely. I would make a sprite image that includes the non-hover and hover states, and shift the background position on hover.