%PDF- %PDF-
| Direktori : /mnt/tnb/Downloads/Eleanor Part I Speculum Pages_files/ |
| Current File : //mnt/tnb/Downloads/Eleanor Part I Speculum Pages_files/scrollspy.js |
!function(n){"use strict";function o(t,s){this.$body=n(document.body),this.$scrollElement=n(t).is(document.body)?n(window):n(t),this.options=n.extend({},o.DEFAULTS,s),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this)),this.refresh(),this.process()}function s(i){return this.each(function(){var t=n(this),s=t.data("bs.scrollspy"),e="object"==typeof i&&i;s||t.data("bs.scrollspy",s=new o(this,e)),"string"==typeof i&&s[i]()})}o.VERSION="3.3.2",o.DEFAULTS={offset:10},o.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},o.prototype.refresh=function(){var t=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),n.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=n(this),s=t.data("target")||t.attr("href"),e=/^#./.test(s)&&n(NexT.utils.escapeSelector(s));return e&&e.length&&e.is(":visible")&&[[e[i]().top+o,s]]||null}).sort(function(t,s){return t[0]-s[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},o.prototype.process=function(){var t,s=this.$scrollElement.scrollTop()+this.options.offset,e=this.getScrollHeight(),i=this.options.offset+e-this.$scrollElement.height(),o=this.offsets,r=this.targets,l=this.activeTarget;if(this.scrollHeight!==e&&this.refresh(),i<=s)return l!==(t=r[r.length-1])&&this.activate(t);if(l&&s<o[0])return n(this.selector).trigger("clear.bs.scrollspy"),this.activeTarget=null,this.clear();for(t=o.length;t--;)l!==r[t]&&s>=o[t]&&(!o[t+1]||s<=o[t+1])&&this.activate(r[t])},o.prototype.activate=function(t){this.activeTarget=t,this.clear();var s=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',e=n(s).parents("li").addClass("active");e.parent(".dropdown-menu").length&&(e=e.closest("li.dropdown").addClass("active")),e.trigger("activate.bs.scrollspy")},o.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=n.fn.scrollspy;n.fn.scrollspy=s,n.fn.scrollspy.Constructor=o,n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=t,this},n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);s.call(t,t.data())})})}(jQuery);