summaryrefslogtreecommitdiff
path: root/themes/default/js/jquery.localscroll.js
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-06-15 12:39:12 +0800
committer <unostar@danalan.info>2009-06-15 17:31:21 +0800
commit0204a5c9e88f8cd257092e4a619ada02ffcd2821 (patch)
tree9079e7ec90a8216b4f687371c2bb9c5d37985448 /themes/default/js/jquery.localscroll.js
parentb8eb4956de76018892bb11fd875c2ba8db86b04b (diff)
Move jquery local scroll module from default theme to lib, only load it if viewing photo view. White space cleanup, removed debug print from template.
Signed-off-by: <unostar@danalan.info>
Diffstat (limited to 'themes/default/js/jquery.localscroll.js')
-rw-r--r--themes/default/js/jquery.localscroll.js9
1 files changed, 0 insertions, 9 deletions
diff --git a/themes/default/js/jquery.localscroll.js b/themes/default/js/jquery.localscroll.js
deleted file mode 100644
index c4b0f3c1..00000000
--- a/themes/default/js/jquery.localscroll.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
- * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
- * Dual licensed under MIT and GPL.
- * Date: 6/3/2008
- * @author Ariel Flesler
- * @version 1.2.6
- **/
-;(function($){var g=location.href.replace(/#.*/,''),h=$.localScroll=function(a){$('body').localScroll(a)};h.defaults={duration:1e3,axis:'y',event:'click',stop:1};h.hash=function(a){a=$.extend({},h.defaults,a);a.hash=0;if(location.hash)setTimeout(function(){i(0,location,a)},0)};$.fn.localScroll=function(b){b=$.extend({},h.defaults,b);return(b.persistent||b.lazy)?this.bind(b.event,function(e){var a=$([e.target,e.target.parentNode]).filter(c)[0];a&&i(e,a,b)}):this.find('a,area').filter(c).bind(b.event,function(e){i(e,this,b)}).end().end();function c(){var a=this;return!!a.href&&!!a.hash&&a.href.replace(a.hash,'')==g&&(!b.filter||$(a).is(b.filter))}};function i(e,a,b){var c=a.hash.slice(1),d=document.getElementById(c)||document.getElementsByName(c)[0],f;if(d){e&&e.preventDefault();f=$(b.target||$.scrollTo.window());if(b.lock&&f.is(':animated')||b.onBefore&&b.onBefore.call(a,e,d,f)===!1)return;if(b.stop)f.queue('fx',[]).stop();f.scrollTo(d,b).trigger('notify.serialScroll',[d]);if(b.hash)f.queue(function(){location=a.hash;$(this).dequeue()})}}})(jQuery);