Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jQuery Nivo Slider problems with duplicating image buttons for slides

Featured Replies

Hi,

 

Here is the link > http:// www.zerogravitysafety.co.uk/recent-training/portfolio-6.html

 

In the content area i have added Nivo Slider, HTML as follows: -

 

<div id="slider">
<img src="<?php bloginfo("template_url"); ?>/images/nivo/sample.jpg" alt="" title="This is an example of a caption" />
<img src="<?php bloginfo("template_url"); ?>/images/nivo/sample2.jpg" alt="" title="This is an example of a caption" />
<img src="<?php bloginfo("template_url"); ?>/images/nivo/sample.jpg" alt="" title="This is an example of a caption" />
<img src="<?php bloginfo("template_url"); ?>/images/nivo/sample2.jpg" alt="" title="This is an example of a caption" />
</div>

 

Notice i have 4 images only.

 

However on the site, below these images the slider is putting in more buttons, suggesting there are more images? In this case 7 buttons for only 4 slides?

 

Why is it duplicating the buttons, there should only be 4 slides, which is resulting in the slideshow not working as it should.

 

If you click the 1st image, then every other image... it works ok, seems to be adding slides/buttons in randomly?

 

Is this a css or javascript issue?

 

Hope someone can help, driving me mad.

 

Thanks

Edited by pbul2004

your actual source has

 

<div id="slider">
<img src="http://www.zerogravitysafety.co.uk/wp-content/themes/parallelus-unite/images/nivo/sample.jpg" alt="" title="This is an example of a caption" /><br />
<img src="http://www.zerogravitysafety.co.uk/wp-content/themes/parallelus-unite/images/nivo/sample2.jpg" alt="" title="This is an example of a caption" /><br />
<img src="http://www.zerogravitysafety.co.uk/wp-content/themes/parallelus-unite/images/nivo/sample.jpg" alt="" title="This is an example of a caption" /><br />
<img src="http://www.zerogravitysafety.co.uk/wp-content/themes/parallelus-unite/images/nivo/sample2.jpg" alt="" title="This is an example of a caption" />
</div>

 

is it doing something silly with <br/> ?

Try removing the <br /> tags from between the images in your HTML. Maybe Nivo is picking them up and trying to show them as slides.

 

Edit: D'oh! Too slow!

Edited by Spitfire

  • Author

Thanks for the replies guys, there was no <br /> in the code, but i put all the html on one line

 

<div id="slider"><img src="<?php bloginfo("template_url"); ?>/images/nivo/sample.jpg" alt="" title="This is an example of a caption" /><img src="<?php bloginfo("template_url"); ?>/images/nivo/sample2.jpg" alt="" title="This is an example of a caption" /><img src="<?php bloginfo("template_url"); ?>/images/nivo/sample.jpg" alt="" title="This is an example of a caption" /><img src="<?php bloginfo("template_url"); ?>/images/nivo/sample2.jpg" alt="" title="This is an example of a caption" /></div>

 

And it seems to have sorted it now!

 

Fresh pair of eyes!

 

Thanks both :-)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.