Skip to content

Instantly share code, notes, and snippets.

@guitsaru
Created March 27, 2009 00:51
Show Gist options
  • Save guitsaru/86475 to your computer and use it in GitHub Desktop.
Save guitsaru/86475 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$('#featured-location-0').show();
$("#ww_img").hover(
function () {
timer.stop();
},
jQuery.timer(200, function(timer) {
var current = parseInt($('.featured:visible').attr('id').split('-')[2]);
var next = current + 1;
if(next >= #{@featured.size}) {
next = 0;
}
$('.featured').hide();
$('#featured-location-' + next).show();
});
);
});
function show_featured(n) {
$('.featured').hide();
$('#featured-location-' + n).show();
}
jQuery.timer(200, function(timer) {
var current = parseInt($('.featured:visible').attr('id').split('-')[2]);
var next = current + 1;
if(next >= #{@featured.size}) {
next = 0;
}
$('.featured').hide();
$('#featured-location-' + next).show();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment