Skip to content

Instantly share code, notes, and snippets.

@ctrl-freak
Created December 21, 2011 05:38
Show Gist options
  • Save ctrl-freak/1504767 to your computer and use it in GitHub Desktop.
Save ctrl-freak/1504767 to your computer and use it in GitHub Desktop.
NivoSlider Control/Navigation Bar
<script type="text/javascript" src="/js/nivo-slider/jquery.nivo.slider.pack.js"></script>
<link type="text/css" rel="stylesheet" href="/js/nivo-slider/nivo-slider.css" />
<script type="text/javascript">
$(document).ready( function(){
$('#slider').nivoSlider({
afterLoad: function() {
$('.nivo-controlNav').append('<ul class="nivo-controlNav-items"></ul>');
$.each($('.nivo-control'), function(index, value) {
$('.nivo-controlNav-items').append($('<li></li>').append($(value)));
});
}
});
});
</script>
<style type="text/css">
.nivo-controlNav {
position: absolute;
bottom: 0;
width: 100%;
display: box;
}
.nivo-controlNav-items {
display: table;
width: 100%;
margin: 0;
padding: 0;
text-indent: 0;
line-height: 0;
}
.nivo-controlNav-items li {
display: table-cell;
}
.nivo-controlNav a {
text-indent: -9001px;
display: block;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment