Hi everyone,
I want to use or try and use the Nivo slider to give me some hero images on the homepage, has anyone used this, I get an error. I have followed their instructions, using a fragment to put the code into the page.
So the header code
Then the code in the fragment
They said I needed
So I put that in the fragment code see above.
Then it helps to add some CSS to make the slider look good while it’s loading, I added this to the end of the Sellerdeck CSS sheet.
I was hoping it was going to work but I have, it won't show me the error at the moment but it doesn't work.
Any thoughts would be appreciated.
Thanks M
I want to use or try and use the Nivo slider to give me some hero images on the homepage, has anyone used this, I get an error. I have followed their instructions, using a fragment to put the code into the page.
So the header code
Code:
<!-- Usually in the <head> section --> <link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script src="jquery.nivo.slider.pack.js" type="text/javascript"></script>
Code:
!!<
<div class="slider-wrapper">
<div id="slider" class="nivoSlider">
<img src="images/013-Nivo-slider/Nivo-slider-001.jpg" alt="" />
<img src="images/013-Nivo-slider/Nivo-slider-002.jpg" alt="" />
<img src="images/013-Nivo-slider/Nivo-slider-003.jpg" alt="" />
<img src="images/013-Nivo-slider/Nivo-slider-004.jpg" alt="" />
<img src="/images/013-Nivo-slider/Nivo-slider-005.jpg" alt="" />
</div>
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
>!!
Finally you need to hook up your script using the $(window).load() function:
Then it helps to add some CSS to make the slider look good while it’s loading, I added this to the end of the Sellerdeck CSS sheet.
Code:
.nivoSlider {
position:relative;
background:url(images/loading.gif) no-repeat 50% 50%;
}
.nivoSlider img {
position:absolute;
top:0px;
left:0px;
display:none;
}
.nivoSlider a {
border:0;
display:block;
}
Any thoughts would be appreciated.
Thanks M
Comment