1
我有四個圖像幻燈片,我想重定向一次完成滑動。怎麼樣?jquery supersized stop_loop重定向?
示例代碼:
jQuery(function($){
$.supersized({
// Functionality
slideshow : 1, // Slideshow on/off
autoplay : 1, // Slideshow starts playing automatically
start_slide : 1, // Start slide (0 is random)
stop_loop : [
if (data)
{
window.location = "http://www.google.com/";
}
], // Pauses slideshow on last slide
random: 0, // Randomize slide order (Ignores start slide)
slide_interval : 9000, // Length between transitions
transition : 6, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right,
// 4-Slide Bottom, 5-Slide Left, 6-Carousel Right,
// 7-Carousel Left
transition_speed : 2000, // Speed of transition
});
});
當新圖像滑入視圖中時,看起來不像有事件的API回調。所以看起來像超時可能是唯一的選擇。如果你想確保你可以在間隔時間內超時,並用current_slide檢查當前幻燈片,並將其添加到數組中,一旦你點擊同一張幻燈片兩次重定向。 – jholloman 2012-07-26 04:10:53