Sha256: 560117db38c164b6a8b8baad5ca31d40814a05a1adbd97beaad8fb9a37123194
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
$(document).foundation(); $(document).ready( function() { var woyo = { time: { page_in: 1000, page_out: 1000, go_slide: 1000, go_fade: 1000, go_delay: 2000 } }; $("body").fadeIn(woyo.time.page_in); $(".way .go").click( function() { $go_link = $(this); go_url = $go_link.attr("href"); $.get( go_url, function(json) { if ( json.going.length > 0 ) { // fix: animate slide with an easing function that begins and ends less abruptly $go_link.siblings(".going") .text(json.going) .slideDown(woyo.time.go_slide) .animate({opacity: 1}, woyo.time.go_fade) .delay(woyo.time.go_delay).queue( function(next) { if ( json.go == true ) { $("body").fadeOut(woyo.time.page_out, function() { window.location.reload(true); }); }; next(); }); } else { if ( json.go == true ) { $("body").fadeOut(woyo.time.page_out, function() { window.location.reload(true); }); }; }; }); return false; }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
woyo-server-0.0.7 | public/server/js/server.js |