Page scroll to id - Version 1.6.6

Version Description

  • Fixed dynamic elements would not work automatically (issue in 1.6.5).
  • Fixed some links would not get highlighted when using full URLs (issue in 1.6.5).
Download this release

Release Info

Developer malihu
Plugin Icon 128x128 Page scroll to id
Version 1.6.6
Comparing to
See all releases

Code changes from version 1.6.5 to 1.6.6

js/jquery.malihu.PageScroll2id-init.js CHANGED
@@ -88,7 +88,7 @@
88
  });
89
  $(window).on("load",function(){
90
  for(var i=0; i<_o.total_instances; i++){
91
- var sel=$(_o.instances[_p+"_instance_"+i]["selector"]+",."+shortcodeClass+","+autoSelectors).not(_o.instances[_p+"_instance_"+i]["excludeSelector"]),
92
  autoCorrectScrollOpt=_o.instances[_p+"_instance_"+i]["autoCorrectScroll"],autoCorrectScroll=0;
93
  sel.mPageScroll2id({
94
  scrollSpeed:_o.instances[_p+"_instance_"+i]["scrollSpeed"],
@@ -115,7 +115,8 @@
115
  if(mPS2id.clicked.length) mPS2id.clicked.trigger("click.mPS2id");
116
  autoCorrectScroll=0;
117
  }
118
- }
 
119
  });
120
  //scroll to location hash on page load
121
  if(_o.instances[_p+"_instance_"+i]["scrollToHash"]==="true" && _hash){
88
  });
89
  $(window).on("load",function(){
90
  for(var i=0; i<_o.total_instances; i++){
91
+ var sel=$(_o.instances[_p+"_instance_"+i]["selector"]+",."+shortcodeClass+","+autoSelectors),
92
  autoCorrectScrollOpt=_o.instances[_p+"_instance_"+i]["autoCorrectScroll"],autoCorrectScroll=0;
93
  sel.mPageScroll2id({
94
  scrollSpeed:_o.instances[_p+"_instance_"+i]["scrollSpeed"],
115
  if(mPS2id.clicked.length) mPS2id.clicked.trigger("click.mPS2id");
116
  autoCorrectScroll=0;
117
  }
118
+ },
119
+ excludeSelectors:_o.instances[_p+"_instance_"+i]["excludeSelector"]
120
  });
121
  //scroll to location hash on page load
122
  if(_o.instances[_p+"_instance_"+i]["scrollToHash"]==="true" && _hash){
js/jquery.malihu.PageScroll2id.js CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  == Page scroll to id ==
3
- Version: 1.6.0
4
  Plugin URI: http://manos.malihu.gr/page-scroll-to-id/
5
  Author: malihu
6
  Author URI: http://manos.malihu.gr
@@ -85,7 +85,9 @@ THE SOFTWARE.
85
  /* highlight elements now and in the future */
86
  live:true,
87
  /* set specific live selector(s): String */
88
- liveSelector:false
 
 
89
  },
90
 
91
  /* vars, constants */
@@ -152,6 +154,9 @@ THE SOFTWARE.
152
  var $this=$(this),
153
  href=$this.attr("href"),
154
  hrefProp=$this.prop("href").baseVal || $this.prop("href");
 
 
 
155
  if(href && href.indexOf("#/")!==-1){
156
  return;
157
  }
@@ -280,6 +285,9 @@ THE SOFTWARE.
280
  return $(el).each(function(){
281
  var $this=$(this),href=$this.attr("href"),hrefProp=$this.prop("href").baseVal || $this.prop("href");
282
  if(functions._isValid.call(null,href,hrefProp)){
 
 
 
283
  var id=(href.indexOf("#/")!==-1) ? href.split("#/")[1] : href.split("#")[1],t=$("#"+id);
284
  if(t.length>0){
285
  if(opt.highlightByNextTarget){
@@ -388,7 +396,11 @@ THE SOFTWARE.
388
  /* finds the element that should be highlighted */
389
 
390
  _findHighlight:function(id){
391
- var wLoc=window.location,loc=escape(wLoc.toString().split("#")[0]),locPath=escape(wLoc.pathname);
 
 
 
 
392
  return $("._"+pluginPfx+"-h[href='#"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#"+id+"'],._"+pluginPfx+"-h[href='#/"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#/"+id+"']");
393
  },
394
 
1
  /*
2
  == Page scroll to id ==
3
+ Version: 1.6.2
4
  Plugin URI: http://manos.malihu.gr/page-scroll-to-id/
5
  Author: malihu
6
  Author URI: http://manos.malihu.gr
85
  /* highlight elements now and in the future */
86
  live:true,
87
  /* set specific live selector(s): String */
88
+ liveSelector:false,
89
+ /* set specific selector(s) that will be excluded from being handled by the plugin: String */
90
+ excludeSelectors:false
91
  },
92
 
93
  /* vars, constants */
154
  var $this=$(this),
155
  href=$this.attr("href"),
156
  hrefProp=$this.prop("href").baseVal || $this.prop("href");
157
+ if(opt.excludeSelectors && $this.is(opt.excludeSelectors)){ //excluded selectors
158
+ return;
159
+ }
160
  if(href && href.indexOf("#/")!==-1){
161
  return;
162
  }
285
  return $(el).each(function(){
286
  var $this=$(this),href=$this.attr("href"),hrefProp=$this.prop("href").baseVal || $this.prop("href");
287
  if(functions._isValid.call(null,href,hrefProp)){
288
+ if(opt.excludeSelectors && $this.is(opt.excludeSelectors)){ //excluded selectors
289
+ return;
290
+ }
291
  var id=(href.indexOf("#/")!==-1) ? href.split("#/")[1] : href.split("#")[1],t=$("#"+id);
292
  if(t.length>0){
293
  if(opt.highlightByNextTarget){
396
  /* finds the element that should be highlighted */
397
 
398
  _findHighlight:function(id){
399
+ var wLoc=window.location,loc=wLoc.toString().split("#")[0],locPath=wLoc.pathname;
400
+ if(loc.indexOf("'")!==-1) loc=loc.replace("'","\\'");
401
+ if(locPath.indexOf("'")!==-1) locPath=locPath.replace("'","\\'");
402
+ loc=decodeURIComponent(loc);
403
+ locPath=decodeURIComponent(locPath);
404
  return $("._"+pluginPfx+"-h[href='#"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#"+id+"'],._"+pluginPfx+"-h[href='#/"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#/"+id+"']");
405
  },
406
 
js/page-scroll-to-id.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Page scroll to id - version 1.6.5 */
2
- !function(O,y,i,e){var n,I,a,s,l,o,r,c,u,h,t,f,g="mPageScroll2id",x="mPS2id",d={scrollSpeed:1e3,autoScrollSpeed:!0,scrollEasing:"easeInOutQuint",scrollingEasing:"easeOutQuint",pageEndSmoothScroll:!0,layout:"vertical",offset:0,highlightSelector:!1,clickedClass:x+"-clicked",targetClass:x+"-target",highlightClass:x+"-highlight",forceSingleHighlight:!1,keepHighlightUntilNext:!1,highlightByNextTarget:!1,disablePluginBelow:!1,clickEvents:!0,appendHash:!1,onStart:function(){},onComplete:function(){},defaultSelector:!1,live:!0,liveSelector:!1},p=0,_={init:function(e){e=O.extend(!0,{},d,e);if(O(i).data(x,e),I=O(i).data(x),!this.selector){var t="__"+x;this.each(function(){var e=O(this);e.hasClass(t)||e.addClass(t)}),this.selector="."+t}I.liveSelector&&(this.selector+=","+I.liveSelector),n=n?n+","+this.selector:this.selector,I.defaultSelector&&("object"==typeof O(n)&&0!==O(n).length||(n=".m_PageScroll2id,a[rel~='m_PageScroll2id'],.page-scroll-to-id,a[rel~='page-scroll-to-id'],._ps2id")),I.clickEvents&&O(i).undelegate("."+x).delegate(n,"click."+x,function(e){if(m._isDisabled.call(null))m._removeClasses.call(null);else{var t=O(this),n=t.attr("href"),a=t.prop("href").baseVal||t.prop("href");n&&-1!==n.indexOf("#/")||(m._reset.call(null),h=t.data("ps2id-offset")||0,m._isValid.call(null,n,a)&&m._findTarget.call(null,n)&&(e.preventDefault(),s="selector",l=t,m._setClasses.call(null,!0),m._scrollTo.call(null)))}}),O(y).unbind("."+x).bind("scroll."+x+" resize."+x,function(){if(m._isDisabled.call(null))m._removeClasses.call(null);else{var s=O("._"+x+"-t");s.each(function(e){var t=O(this),n=t.attr("id"),a=m._findHighlight.call(null,n);m._setClasses.call(null,!1,t,a),e==s.length-1&&m._extendClasses.call(null)})}}),a=!0,m._setup.call(null),m._live.call(null)},scrollTo:function(e,t){if(m._isDisabled.call(null))m._removeClasses.call(null);else if(e&&void 0!==e){m._isInit.call(null);var n={layout:I.layout,offset:I.offset,clicked:!1};t=O.extend(!0,{},n,t);m._reset.call(null),c=t.layout,u=t.offset,e=-1!==e.indexOf("#")?e:"#"+e,m._isValid.call(null,e)&&m._findTarget.call(null,e)&&(s="scrollTo",(l=t.clicked)&&m._setClasses.call(null,!0),m._scrollTo.call(null))}},destroy:function(){O(y).unbind("."+x),O(i).undelegate("."+x).removeData(x),O("._"+x+"-t").removeData(x),m._removeClasses.call(null,!0)}},m={_isDisabled:function(){var e=y,t="inner",n=I.disablePluginBelow instanceof Array?[I.disablePluginBelow[0]||0,I.disablePluginBelow[1]||0]:[I.disablePluginBelow||0,0];return"innerWidth"in y||(t="client",e=i.documentElement||i.body),e[t+"Width"]<=n[0]||e[t+"Height"]<=n[1]},_isValid:function(e,t){if(e){var n=-1!==(t=t||e).indexOf("#/")?t.split("#/")[0]:t.split("#")[0],a=y.location.toString().split("#")[0];return"#"!==e&&-1!==e.indexOf("#")&&(""===n||decodeURIComponent(n)===decodeURIComponent(a))}},_setup:function(){var l=m._highlightSelector(),o=1,r=0;return O(l).each(function(){var e=O(this),t=e.attr("href"),n=e.prop("href").baseVal||e.prop("href");if(m._isValid.call(null,t,n)){var a=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("#")[1],s=O("#"+a);if(0<s.length){I.highlightByNextTarget&&s!==r&&(r?r.data(x,{tn:s}):s.data(x,{tn:"0"}),r=s),s.hasClass("_"+x+"-t")||s.addClass("_"+x+"-t"),s.data(x,{i:o}),e.hasClass("_"+x+"-h")||e.addClass("_"+x+"-h");var i=m._findHighlight.call(null,a);m._setClasses.call(null,!1,s,i),p=o,++o==O(l).length&&m._extendClasses.call(null)}}})},_highlightSelector:function(){return I.highlightSelector&&""!==I.highlightSelector?I.highlightSelector:n},_findTarget:function(e){var t=-1!==e.indexOf("#/")?e.split("#/")[1]:e.split("#")[1],n=O("#"+t);if(n.length<1||"fixed"===n.css("position")){if("top"!==t)return;n=O("body")}return o=n,c||(c=I.layout),u=m._setOffset.call(null),(r=[(n.offset().top-u[0]).toString(),(n.offset().left-u[1]).toString()])[0]=r[0]<0?0:r[0],r[1]=r[1]<0?0:r[1],r},_setOffset:function(){var e,t,n,a;switch(u||(u=I.offset?I.offset:0),h&&(u=h),typeof u){case"object":case"string":0<(t=[(e=[u.y?u.y:u,u.x?u.x:u])[0]instanceof jQuery?e[0]:O(e[0]),e[1]instanceof jQuery?e[1]:O(e[1])])[0].length?(n=t[0].height(),"fixed"===t[0].css("position")&&(n+=t[0][0].offsetTop)):n=!isNaN(parseFloat(e[0]))&&isFinite(e[0])?parseInt(e[0]):0,0<t[1].length?(a=t[1].width(),"fixed"===t[1].css("position")&&(a+=t[1][0].offsetLeft)):a=!isNaN(parseFloat(e[1]))&&isFinite(e[1])?parseInt(e[1]):0;break;case"function":(e=u.call(null))instanceof Array?(n=e[0],a=e[1]):n=a=e;break;default:n=a=parseInt(u)}return[n,a]},_findHighlight:function(e){var t=y.location,n=escape(t.toString().split("#")[0]),a=escape(t.pathname);return O("._"+x+"-h[href='#"+e+"'],._"+x+"-h[href='"+n+"#"+e+"'],._"+x+"-h[href='"+a+"#"+e+"'],._"+x+"-h[href='#/"+e+"'],._"+x+"-h[href='"+n+"#/"+e+"'],._"+x+"-h[href='"+a+"#/"+e+"']")},_setClasses:function(e,t,n){var a=I.clickedClass,s=I.targetClass,i=I.highlightClass;e&&a&&""!==a?(O("."+a).removeClass(a),l.addClass(a)):t&&s&&""!==s&&n&&i&&""!==i&&(m._currentTarget.call(null,t)?(t.addClass(s),n.addClass(i)):(!I.keepHighlightUntilNext||1<O("."+i).length)&&(t.removeClass(s),n.removeClass(i)))},_extendClasses:function(){var e=I.targetClass,t=I.highlightClass,n=O("."+e),a=O("."+t),s=e+"-first",i=e+"-last",l=t+"-first",o=t+"-last";O("._"+x+"-t").removeClass(s+" "+i),O("._"+x+"-h").removeClass(l+" "+o),I.forceSingleHighlight?I.keepHighlightUntilNext&&1<n.length?(n.slice(0,1).removeClass(e),a.slice(0,1).removeClass(t)):(n.slice(1).removeClass(e),a.slice(1).removeClass(t)):(n.slice(0,1).addClass(s).end().slice(-1).addClass(i),a.slice(0,1).addClass(l).end().slice(-1).addClass(o))},_removeClasses:function(e){O("."+I.clickedClass).removeClass(I.clickedClass),O("."+I.targetClass).removeClass(I.targetClass+" "+I.targetClass+"-first "+I.targetClass+"-last"),O("."+I.highlightClass).removeClass(I.highlightClass+" "+I.highlightClass+"-first "+I.highlightClass+"-last"),e&&(O("._"+x+"-t").removeClass("_"+x+"-t"),O("._"+x+"-h").removeClass("_"+x+"-h"))},_currentTarget:function(e){var t=I["target_"+e.data(x).i],n=e.data("ps2id-target"),a=n&&O(n)[0]?O(n)[0].getBoundingClientRect():e[0].getBoundingClientRect();if(void 0!==t){var s=e.offset().top,i=e.offset().left,l=t.from?t.from+s:s,o=t.to?t.to+s:s,r=t.fromX?t.fromX+i:i,c=t.toX?t.toX+i:i;return a.top>=o&&a.top<=l&&a.left>=c&&a.left<=r}var u=O(y).height(),h=O(y).width(),f=n?O(n).height():e.height(),g=n?O(n).width():e.width(),d=1+f/u,p=d,_=f<u?d*(u/f):d,m=1+g/h,S=m,v=g<h?m*(h/g):m,C=[a.top<=u/p,a.bottom>=u/_,a.left<=h/S,a.right>=h/v];if(I.highlightByNextTarget){var w=e.data(x).tn;if(w){var b=w[0].getBoundingClientRect();"vertical"===I.layout?C=[a.top<=u/2,b.top>u/2,1,1]:"horizontal"===I.layout&&(C=[1,1,a.left<=h/2,b.left>h/2])}}return C[0]&&C[1]&&C[2]&&C[3]},_scrollTo:function(){f=m._scrollSpeed.call(null),r=I.pageEndSmoothScroll?m._pageEndSmoothScroll.call(null):r;var e=O("html,body"),t=I.autoScrollSpeed?m._autoScrollSpeed.call(null):f,n=e.is(":animated")?I.scrollingEasing:I.scrollEasing,a=O(y).scrollTop(),s=O(y).scrollLeft();switch(c){case"horizontal":s!=r[1]&&(m._callbacks.call(null,"onStart"),e.stop().animate({scrollLeft:r[1]},t,n).promise().then(function(){m._callbacks.call(null,"onComplete")}));break;case"auto":var i;if(a!=r[0]||s!=r[1])if(m._callbacks.call(null,"onStart"),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/))e.stop().animate({pageYOffset:r[0],pageXOffset:r[1]},{duration:t,easing:n,step:function(e,t){"pageXOffset"==t.prop?i=e:"pageYOffset"==t.prop&&y.scrollTo(i,e)}}).promise().then(function(){m._callbacks.call(null,"onComplete")});else e.stop().animate({scrollTop:r[0],scrollLeft:r[1]},t,n).promise().then(function(){m._callbacks.call(null,"onComplete")});break;default:a!=r[0]&&(m._callbacks.call(null,"onStart"),e.stop().animate({scrollTop:r[0]},t,n).promise().then(function(){m._callbacks.call(null,"onComplete")}))}},_pageEndSmoothScroll:function(){var e=O(i).height(),t=O(i).width(),n=O(y).height(),a=O(y).width();return[e-r[0]<n?e-n:r[0],t-r[1]<a?t-a:r[1]]},_scrollSpeed:function(){var a=I.scrollSpeed;return l&&l.length&&l.add(l.parent()).each(function(){var e=O(this);if(e.attr("class")){var t=e.attr("class").split(" ");for(var n in t)if(String(t[n]).match(/^ps2id-speed-\d+$/)){a=t[n].split("ps2id-speed-")[1];break}}}),parseInt(a)},_autoScrollSpeed:function(){var e=O(y).scrollTop(),t=O(y).scrollLeft(),n=O(i).height(),a=O(i).width(),s=[f+f*Math.floor(Math.abs(r[0]-e)/n*100)/100,f+f*Math.floor(Math.abs(r[1]-t)/a*100)/100];return Math.max.apply(Math,s)},_callbacks:function(e){if(I)switch(this[x]={trigger:s,clicked:l,target:o,scrollTo:{y:r[0],x:r[1]}},e){case"onStart":if(I.appendHash&&y.history&&y.history.pushState&&l&&l.length){var t="#"+l.attr("href").split("#")[1];t!==y.location.hash&&history.pushState("","",t)}I.onStart.call(null,this[x]);break;case"onComplete":I.onComplete.call(null,this[x])}},_reset:function(){c=u=h=!1},_isInit:function(){a||_.init.apply(this)},_live:function(){t=setTimeout(function(){I.live?O(m._highlightSelector()).length!==p&&m._setup.call(null):t&&clearTimeout(t),m._live.call(null)},1e3)},_easing:function(){function t(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375}O.easing.easeInQuad=O.easing.easeInQuad||function(e){return e*e},O.easing.easeOutQuad=O.easing.easeOutQuad||function(e){return 1-(1-e)*(1-e)},O.easing.easeInOutQuad=O.easing.easeInOutQuad||function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2},O.easing.easeInCubic=O.easing.easeInCubic||function(e){return e*e*e},O.easing.easeOutCubic=O.easing.easeOutCubic||function(e){return 1-Math.pow(1-e,3)},O.easing.easeInOutCubic=O.easing.easeInOutCubic||function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},O.easing.easeInQuart=O.easing.easeInQuart||function(e){return e*e*e*e},O.easing.easeOutQuart=O.easing.easeOutQuart||function(e){return 1-Math.pow(1-e,4)},O.easing.easeInOutQuart=O.easing.easeInOutQuart||function(e){return e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2},O.easing.easeInQuint=O.easing.easeInQuint||function(e){return e*e*e*e*e},O.easing.easeOutQuint=O.easing.easeOutQuint||function(e){return 1-Math.pow(1-e,5)},O.easing.easeInOutQuint=O.easing.easeInOutQuint||function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2},O.easing.easeInExpo=O.easing.easeInExpo||function(e){return 0===e?0:Math.pow(2,10*e-10)},O.easing.easeOutExpo=O.easing.easeOutExpo||function(e){return 1===e?1:1-Math.pow(2,-10*e)},O.easing.easeInOutExpo=O.easing.easeInOutExpo||function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},O.easing.easeInSine=O.easing.easeInSine||function(e){return 1-Math.cos(e*Math.PI/2)},O.easing.easeOutSine=O.easing.easeOutSine||function(e){return Math.sin(e*Math.PI/2)},O.easing.easeInOutSine=O.easing.easeInOutSine||function(e){return-(Math.cos(Math.PI*e)-1)/2},O.easing.easeInCirc=O.easing.easeInCirc||function(e){return 1-Math.sqrt(1-Math.pow(e,2))},O.easing.easeOutCirc=O.easing.easeOutCirc||function(e){return Math.sqrt(1-Math.pow(e-1,2))},O.easing.easeInOutCirc=O.easing.easeInOutCirc||function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2},O.easing.easeInElastic=O.easing.easeInElastic||function(e){return 0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*(2*Math.PI/3))},O.easing.easeOutElastic=O.easing.easeOutElastic||function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*(2*Math.PI/3))+1},O.easing.easeInOutElastic=O.easing.easeInOutElastic||function(e){return 0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1},O.easing.easeInBack=O.easing.easeInBack||function(e){return 2.70158*e*e*e-1.70158*e*e},O.easing.easeOutBack=O.easing.easeOutBack||function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)},O.easing.easeInOutBack=O.easing.easeInOutBack||function(e){return e<.5?Math.pow(2*e,2)*(7.189819*e-2.5949095)/2:(Math.pow(2*e-2,2)*(3.5949095*(2*e-2)+2.5949095)+2)/2},O.easing.easeInBounce=O.easing.easeInBounce||function(e){return 1-t(1-e)},O.easing.easeOutBounce=O.easing.easeOutBounce||t,O.easing.easeInOutBounce=O.easing.easeInOutBounce||function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}}};m._easing.call(),O.fn[g]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void O.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},O[g]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void O.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},O[g].defaults=d}(jQuery,window,document),function(l){var o="mPS2id",r=mPS2id_params,c=r.shortcode_class,u=location.hash||null,h=function(e,t){try{l(e)}catch(e){return!1}return l(e).length&&(t||l("a[href*='"+e+"']").filter(function(){return 1==l(this).data(o+"Element")}).length)},f=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return{y:t[0]||"0",x:t[1]||"0"}},g=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return[t[0]||"0",t[1]||"0"]},d=function(e){"horizontal"!==e&&l(window).scrollTop(0),"vertical"!==e&&l(window).scrollLeft(0)},p=function(e,t){for(var n=e.click.length-1;0<=n;n--){var a=e.click[n];a&&"mPS2id"!=a.namespace&&('a[href*="#"]'===a.selector?a.selector='a[href*="#"]:not(._mPS2id-h)':"a[href*=#]:not([href=#])"===a.selector?a.selector="a[href*=#]:not([href=#]):not(._mPS2id-h)":a.selector&&-1!==a.selector.indexOf("mobmenu")?t.off("click"):t.off("click",a.handler))}},_="a[data-ps2id-api='true'][href*='#'],.ps2id > a[href*='#'],a.ps2id[href*='#']";l(document).ready(function(){for(var e=0;e<r.total_instances;e++){var t=l("[class*='ps2id-id-']");if(t.length&&t.each(function(){var e,t=l(this),n=t.attr("class").split(" ");if(!t.attr("id"))for(var a in n)if(String(n[a]).match(/^ps2id-id-\S+$/)){e=n[a].split("ps2id-id-")[1],l("#"+e).length||t.attr("id",e);break}}),"true"===r.instances[o+"_instance_"+e].scrollToHash&&u&&(l(r.instances[o+"_instance_"+e].selector+",."+c+","+_).not(r.instances[o+"_instance_"+e].excludeSelector).each(function(){l(this).data(o+"Element",!0)}),h(u,"true"===r.instances[o+"_instance_"+e].scrollToHashForAll))){var n="true"===r.instances[o+"_instance_"+e].scrollToHashRemoveUrlHash?window.location.href.replace(/#.*$/,""):window.location.href.replace(/#.*$/,"#");d(r.instances[o+"_instance_"+e].layout),window.history&&window.history.replaceState?window.history.replaceState("","",n):window.location.href=n}}}),l(window).on("load",function(){for(var e=0;e<r.total_instances;e++){var n=l(r.instances[o+"_instance_"+e].selector+",."+c+","+_).not(r.instances[o+"_instance_"+e].excludeSelector),t=r.instances[o+"_instance_"+e].autoCorrectScroll,a=0;if(n.mPageScroll2id({scrollSpeed:r.instances[o+"_instance_"+e].scrollSpeed,autoScrollSpeed:"true"===r.instances[o+"_instance_"+e].autoScrollSpeed,scrollEasing:r.instances[o+"_instance_"+e].scrollEasing,scrollingEasing:r.instances[o+"_instance_"+e].scrollingEasing,pageEndSmoothScroll:"true"===r.instances[o+"_instance_"+e].pageEndSmoothScroll,layout:r.instances[o+"_instance_"+e].layout,offset:f(r.instances[o+"_instance_"+e].offset.toString()),highlightSelector:r.instances[o+"_instance_"+e].highlightSelector,clickedClass:r.instances[o+"_instance_"+e].clickedClass,targetClass:r.instances[o+"_instance_"+e].targetClass,highlightClass:r.instances[o+"_instance_"+e].highlightClass,forceSingleHighlight:"true"===r.instances[o+"_instance_"+e].forceSingleHighlight,keepHighlightUntilNext:"true"===r.instances[o+"_instance_"+e].keepHighlightUntilNext,highlightByNextTarget:"true"===r.instances[o+"_instance_"+e].highlightByNextTarget,disablePluginBelow:g(r.instances[o+"_instance_"+e].disablePluginBelow.toString()),appendHash:"true"===r.instances[o+"_instance_"+e].appendHash,onStart:function(){"true"===t&&"selector"===mPS2id.trigger&&a++},onComplete:function(){1==a&&(mPS2id.clicked.length&&mPS2id.clicked.trigger("click.mPS2id"),a=0)}}),"true"===r.instances[o+"_instance_"+e].scrollToHash&&u&&h(u,"true"===r.instances[o+"_instance_"+e].scrollToHashForAll)){d(r.instances[o+"_instance_"+e].layout);var s=r.instances[o+"_instance_"+e].scrollToHashUseElementData,i=l("a._mPS2id-h[href$='"+u+"'][data-ps2id-offset]:not([data-ps2id-offset=''])").last();setTimeout(function(){"true"===s&&i.length?i.trigger("click.mPS2id"):l.mPageScroll2id("scrollTo",u),-1!==window.location.href.indexOf("#")&&(window.history&&window.history.replaceState?window.history.replaceState("","",u):window.location.hash=u)},r.instances[o+"_instance_"+e].scrollToHashDelay)}"true"===r.instances[o+"_instance_"+e].unbindUnrelatedClickEvents&&setTimeout(function(){var e=n.length?l._data(n[0],"events"):null,t=n.length?l._data(l(document)[0],"events"):null;e&&p(e,n),t&&p(t,n)},300),"true"===r.instances[o+"_instance_"+e].normalizeAnchorPointTargets&&l("a._mPS2id-t[id]:empty").css({display:"inline-block","line-height":0,width:0,height:0,border:"none"}),"true"===r.instances[o+"_instance_"+e].stopScrollOnUserAction&&l(document).on("mousewheel DOMMouseScroll touchmove",function(){var e=l("html,body");e.is(":animated")&&e.stop()})}}),l.extend(l.expr[":"],{absolute:l.expr[":"].absolute||function(e){return"absolute"===l(e).css("position")},relative:l.expr[":"].relative||function(e){return"relative"===l(e).css("position")},static:l.expr[":"].static||function(e){return"static"===l(e).css("position")},fixed:l.expr[":"].fixed||function(e){return"fixed"===l(e).css("position")},width:l.expr[":"].width||function(e,t,n){var a=n[3].replace("&lt;","<").replace("&gt;",">");return!!a&&(">"===a.substr(0,1)?l(e).width()>a.substr(1):"<"===a.substr(0,1)?l(e).width()<a.substr(1):l(e).width()===parseInt(a))},height:l.expr[":"].height||function(e,t,n){var a=n[3].replace("&lt;","<").replace("&gt;",">");return!!a&&(">"===a.substr(0,1)?l(e).height()>a.substr(1):"<"===a.substr(0,1)?l(e).height()<a.substr(1):l(e).height()===parseInt(a))}})}(jQuery);
1
+ /* Page scroll to id - version 1.6.6 */
2
+ !function(x,O,i,e){var n,I,a,s,l,o,r,c,u,h,t,f,g="mPageScroll2id",y="mPS2id",d={scrollSpeed:1e3,autoScrollSpeed:!0,scrollEasing:"easeInOutQuint",scrollingEasing:"easeOutQuint",pageEndSmoothScroll:!0,layout:"vertical",offset:0,highlightSelector:!1,clickedClass:y+"-clicked",targetClass:y+"-target",highlightClass:y+"-highlight",forceSingleHighlight:!1,keepHighlightUntilNext:!1,highlightByNextTarget:!1,disablePluginBelow:!1,clickEvents:!0,appendHash:!1,onStart:function(){},onComplete:function(){},defaultSelector:!1,live:!0,liveSelector:!1,excludeSelectors:!1},p=0,_={init:function(e){e=x.extend(!0,{},d,e);if(x(i).data(y,e),I=x(i).data(y),!this.selector){var t="__"+y;this.each(function(){var e=x(this);e.hasClass(t)||e.addClass(t)}),this.selector="."+t}I.liveSelector&&(this.selector+=","+I.liveSelector),n=n?n+","+this.selector:this.selector,I.defaultSelector&&("object"==typeof x(n)&&0!==x(n).length||(n=".m_PageScroll2id,a[rel~='m_PageScroll2id'],.page-scroll-to-id,a[rel~='page-scroll-to-id'],._ps2id")),I.clickEvents&&x(i).undelegate("."+y).delegate(n,"click."+y,function(e){if(S._isDisabled.call(null))S._removeClasses.call(null);else{var t=x(this),n=t.attr("href"),a=t.prop("href").baseVal||t.prop("href");I.excludeSelectors&&t.is(I.excludeSelectors)||n&&-1!==n.indexOf("#/")||(S._reset.call(null),h=t.data("ps2id-offset")||0,S._isValid.call(null,n,a)&&S._findTarget.call(null,n)&&(e.preventDefault(),s="selector",l=t,S._setClasses.call(null,!0),S._scrollTo.call(null)))}}),x(O).unbind("."+y).bind("scroll."+y+" resize."+y,function(){if(S._isDisabled.call(null))S._removeClasses.call(null);else{var s=x("._"+y+"-t");s.each(function(e){var t=x(this),n=t.attr("id"),a=S._findHighlight.call(null,n);S._setClasses.call(null,!1,t,a),e==s.length-1&&S._extendClasses.call(null)})}}),a=!0,S._setup.call(null),S._live.call(null)},scrollTo:function(e,t){if(S._isDisabled.call(null))S._removeClasses.call(null);else if(e&&void 0!==e){S._isInit.call(null);var n={layout:I.layout,offset:I.offset,clicked:!1};t=x.extend(!0,{},n,t);S._reset.call(null),c=t.layout,u=t.offset,e=-1!==e.indexOf("#")?e:"#"+e,S._isValid.call(null,e)&&S._findTarget.call(null,e)&&(s="scrollTo",(l=t.clicked)&&S._setClasses.call(null,!0),S._scrollTo.call(null))}},destroy:function(){x(O).unbind("."+y),x(i).undelegate("."+y).removeData(y),x("._"+y+"-t").removeData(y),S._removeClasses.call(null,!0)}},S={_isDisabled:function(){var e=O,t="inner",n=I.disablePluginBelow instanceof Array?[I.disablePluginBelow[0]||0,I.disablePluginBelow[1]||0]:[I.disablePluginBelow||0,0];return"innerWidth"in O||(t="client",e=i.documentElement||i.body),e[t+"Width"]<=n[0]||e[t+"Height"]<=n[1]},_isValid:function(e,t){if(e){var n=-1!==(t=t||e).indexOf("#/")?t.split("#/")[0]:t.split("#")[0],a=O.location.toString().split("#")[0];return"#"!==e&&-1!==e.indexOf("#")&&(""===n||decodeURIComponent(n)===decodeURIComponent(a))}},_setup:function(){var l=S._highlightSelector(),o=1,r=0;return x(l).each(function(){var e=x(this),t=e.attr("href"),n=e.prop("href").baseVal||e.prop("href");if(S._isValid.call(null,t,n)){if(I.excludeSelectors&&e.is(I.excludeSelectors))return;var a=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("#")[1],s=x("#"+a);if(0<s.length){I.highlightByNextTarget&&s!==r&&(r?r.data(y,{tn:s}):s.data(y,{tn:"0"}),r=s),s.hasClass("_"+y+"-t")||s.addClass("_"+y+"-t"),s.data(y,{i:o}),e.hasClass("_"+y+"-h")||e.addClass("_"+y+"-h");var i=S._findHighlight.call(null,a);S._setClasses.call(null,!1,s,i),p=o,++o==x(l).length&&S._extendClasses.call(null)}}})},_highlightSelector:function(){return I.highlightSelector&&""!==I.highlightSelector?I.highlightSelector:n},_findTarget:function(e){var t=-1!==e.indexOf("#/")?e.split("#/")[1]:e.split("#")[1],n=x("#"+t);if(n.length<1||"fixed"===n.css("position")){if("top"!==t)return;n=x("body")}return o=n,c||(c=I.layout),u=S._setOffset.call(null),(r=[(n.offset().top-u[0]).toString(),(n.offset().left-u[1]).toString()])[0]=r[0]<0?0:r[0],r[1]=r[1]<0?0:r[1],r},_setOffset:function(){var e,t,n,a;switch(u||(u=I.offset?I.offset:0),h&&(u=h),typeof u){case"object":case"string":0<(t=[(e=[u.y?u.y:u,u.x?u.x:u])[0]instanceof jQuery?e[0]:x(e[0]),e[1]instanceof jQuery?e[1]:x(e[1])])[0].length?(n=t[0].height(),"fixed"===t[0].css("position")&&(n+=t[0][0].offsetTop)):n=!isNaN(parseFloat(e[0]))&&isFinite(e[0])?parseInt(e[0]):0,0<t[1].length?(a=t[1].width(),"fixed"===t[1].css("position")&&(a+=t[1][0].offsetLeft)):a=!isNaN(parseFloat(e[1]))&&isFinite(e[1])?parseInt(e[1]):0;break;case"function":(e=u.call(null))instanceof Array?(n=e[0],a=e[1]):n=a=e;break;default:n=a=parseInt(u)}return[n,a]},_findHighlight:function(e){var t=O.location,n=t.toString().split("#")[0],a=t.pathname;return-1!==n.indexOf("'")&&(n=n.replace("'","\\'")),-1!==a.indexOf("'")&&(a=a.replace("'","\\'")),n=decodeURIComponent(n),a=decodeURIComponent(a),x("._"+y+"-h[href='#"+e+"'],._"+y+"-h[href='"+n+"#"+e+"'],._"+y+"-h[href='"+a+"#"+e+"'],._"+y+"-h[href='#/"+e+"'],._"+y+"-h[href='"+n+"#/"+e+"'],._"+y+"-h[href='"+a+"#/"+e+"']")},_setClasses:function(e,t,n){var a=I.clickedClass,s=I.targetClass,i=I.highlightClass;e&&a&&""!==a?(x("."+a).removeClass(a),l.addClass(a)):t&&s&&""!==s&&n&&i&&""!==i&&(S._currentTarget.call(null,t)?(t.addClass(s),n.addClass(i)):(!I.keepHighlightUntilNext||1<x("."+i).length)&&(t.removeClass(s),n.removeClass(i)))},_extendClasses:function(){var e=I.targetClass,t=I.highlightClass,n=x("."+e),a=x("."+t),s=e+"-first",i=e+"-last",l=t+"-first",o=t+"-last";x("._"+y+"-t").removeClass(s+" "+i),x("._"+y+"-h").removeClass(l+" "+o),I.forceSingleHighlight?I.keepHighlightUntilNext&&1<n.length?(n.slice(0,1).removeClass(e),a.slice(0,1).removeClass(t)):(n.slice(1).removeClass(e),a.slice(1).removeClass(t)):(n.slice(0,1).addClass(s).end().slice(-1).addClass(i),a.slice(0,1).addClass(l).end().slice(-1).addClass(o))},_removeClasses:function(e){x("."+I.clickedClass).removeClass(I.clickedClass),x("."+I.targetClass).removeClass(I.targetClass+" "+I.targetClass+"-first "+I.targetClass+"-last"),x("."+I.highlightClass).removeClass(I.highlightClass+" "+I.highlightClass+"-first "+I.highlightClass+"-last"),e&&(x("._"+y+"-t").removeClass("_"+y+"-t"),x("._"+y+"-h").removeClass("_"+y+"-h"))},_currentTarget:function(e){var t=I["target_"+e.data(y).i],n=e.data("ps2id-target"),a=n&&x(n)[0]?x(n)[0].getBoundingClientRect():e[0].getBoundingClientRect();if(void 0!==t){var s=e.offset().top,i=e.offset().left,l=t.from?t.from+s:s,o=t.to?t.to+s:s,r=t.fromX?t.fromX+i:i,c=t.toX?t.toX+i:i;return a.top>=o&&a.top<=l&&a.left>=c&&a.left<=r}var u=x(O).height(),h=x(O).width(),f=n?x(n).height():e.height(),g=n?x(n).width():e.width(),d=1+f/u,p=d,_=f<u?d*(u/f):d,S=1+g/h,m=S,v=g<h?S*(h/g):S,C=[a.top<=u/p,a.bottom>=u/_,a.left<=h/m,a.right>=h/v];if(I.highlightByNextTarget){var w=e.data(y).tn;if(w){var b=w[0].getBoundingClientRect();"vertical"===I.layout?C=[a.top<=u/2,b.top>u/2,1,1]:"horizontal"===I.layout&&(C=[1,1,a.left<=h/2,b.left>h/2])}}return C[0]&&C[1]&&C[2]&&C[3]},_scrollTo:function(){f=S._scrollSpeed.call(null),r=I.pageEndSmoothScroll?S._pageEndSmoothScroll.call(null):r;var e=x("html,body"),t=I.autoScrollSpeed?S._autoScrollSpeed.call(null):f,n=e.is(":animated")?I.scrollingEasing:I.scrollEasing,a=x(O).scrollTop(),s=x(O).scrollLeft();switch(c){case"horizontal":s!=r[1]&&(S._callbacks.call(null,"onStart"),e.stop().animate({scrollLeft:r[1]},t,n).promise().then(function(){S._callbacks.call(null,"onComplete")}));break;case"auto":var i;if(a!=r[0]||s!=r[1])if(S._callbacks.call(null,"onStart"),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/))e.stop().animate({pageYOffset:r[0],pageXOffset:r[1]},{duration:t,easing:n,step:function(e,t){"pageXOffset"==t.prop?i=e:"pageYOffset"==t.prop&&O.scrollTo(i,e)}}).promise().then(function(){S._callbacks.call(null,"onComplete")});else e.stop().animate({scrollTop:r[0],scrollLeft:r[1]},t,n).promise().then(function(){S._callbacks.call(null,"onComplete")});break;default:a!=r[0]&&(S._callbacks.call(null,"onStart"),e.stop().animate({scrollTop:r[0]},t,n).promise().then(function(){S._callbacks.call(null,"onComplete")}))}},_pageEndSmoothScroll:function(){var e=x(i).height(),t=x(i).width(),n=x(O).height(),a=x(O).width();return[e-r[0]<n?e-n:r[0],t-r[1]<a?t-a:r[1]]},_scrollSpeed:function(){var a=I.scrollSpeed;return l&&l.length&&l.add(l.parent()).each(function(){var e=x(this);if(e.attr("class")){var t=e.attr("class").split(" ");for(var n in t)if(String(t[n]).match(/^ps2id-speed-\d+$/)){a=t[n].split("ps2id-speed-")[1];break}}}),parseInt(a)},_autoScrollSpeed:function(){var e=x(O).scrollTop(),t=x(O).scrollLeft(),n=x(i).height(),a=x(i).width(),s=[f+f*Math.floor(Math.abs(r[0]-e)/n*100)/100,f+f*Math.floor(Math.abs(r[1]-t)/a*100)/100];return Math.max.apply(Math,s)},_callbacks:function(e){if(I)switch(this[y]={trigger:s,clicked:l,target:o,scrollTo:{y:r[0],x:r[1]}},e){case"onStart":if(I.appendHash&&O.history&&O.history.pushState&&l&&l.length){var t="#"+l.attr("href").split("#")[1];t!==O.location.hash&&history.pushState("","",t)}I.onStart.call(null,this[y]);break;case"onComplete":I.onComplete.call(null,this[y])}},_reset:function(){c=u=h=!1},_isInit:function(){a||_.init.apply(this)},_live:function(){t=setTimeout(function(){I.live?x(S._highlightSelector()).length!==p&&S._setup.call(null):t&&clearTimeout(t),S._live.call(null)},1e3)},_easing:function(){function t(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375}x.easing.easeInQuad=x.easing.easeInQuad||function(e){return e*e},x.easing.easeOutQuad=x.easing.easeOutQuad||function(e){return 1-(1-e)*(1-e)},x.easing.easeInOutQuad=x.easing.easeInOutQuad||function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2},x.easing.easeInCubic=x.easing.easeInCubic||function(e){return e*e*e},x.easing.easeOutCubic=x.easing.easeOutCubic||function(e){return 1-Math.pow(1-e,3)},x.easing.easeInOutCubic=x.easing.easeInOutCubic||function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},x.easing.easeInQuart=x.easing.easeInQuart||function(e){return e*e*e*e},x.easing.easeOutQuart=x.easing.easeOutQuart||function(e){return 1-Math.pow(1-e,4)},x.easing.easeInOutQuart=x.easing.easeInOutQuart||function(e){return e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2},x.easing.easeInQuint=x.easing.easeInQuint||function(e){return e*e*e*e*e},x.easing.easeOutQuint=x.easing.easeOutQuint||function(e){return 1-Math.pow(1-e,5)},x.easing.easeInOutQuint=x.easing.easeInOutQuint||function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2},x.easing.easeInExpo=x.easing.easeInExpo||function(e){return 0===e?0:Math.pow(2,10*e-10)},x.easing.easeOutExpo=x.easing.easeOutExpo||function(e){return 1===e?1:1-Math.pow(2,-10*e)},x.easing.easeInOutExpo=x.easing.easeInOutExpo||function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},x.easing.easeInSine=x.easing.easeInSine||function(e){return 1-Math.cos(e*Math.PI/2)},x.easing.easeOutSine=x.easing.easeOutSine||function(e){return Math.sin(e*Math.PI/2)},x.easing.easeInOutSine=x.easing.easeInOutSine||function(e){return-(Math.cos(Math.PI*e)-1)/2},x.easing.easeInCirc=x.easing.easeInCirc||function(e){return 1-Math.sqrt(1-Math.pow(e,2))},x.easing.easeOutCirc=x.easing.easeOutCirc||function(e){return Math.sqrt(1-Math.pow(e-1,2))},x.easing.easeInOutCirc=x.easing.easeInOutCirc||function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2},x.easing.easeInElastic=x.easing.easeInElastic||function(e){return 0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*(2*Math.PI/3))},x.easing.easeOutElastic=x.easing.easeOutElastic||function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*(2*Math.PI/3))+1},x.easing.easeInOutElastic=x.easing.easeInOutElastic||function(e){return 0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1},x.easing.easeInBack=x.easing.easeInBack||function(e){return 2.70158*e*e*e-1.70158*e*e},x.easing.easeOutBack=x.easing.easeOutBack||function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)},x.easing.easeInOutBack=x.easing.easeInOutBack||function(e){return e<.5?Math.pow(2*e,2)*(7.189819*e-2.5949095)/2:(Math.pow(2*e-2,2)*(3.5949095*(2*e-2)+2.5949095)+2)/2},x.easing.easeInBounce=x.easing.easeInBounce||function(e){return 1-t(1-e)},x.easing.easeOutBounce=x.easing.easeOutBounce||t,x.easing.easeInOutBounce=x.easing.easeInOutBounce||function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}}};S._easing.call(),x.fn[g]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void x.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},x[g]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void x.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},x[g].defaults=d}(jQuery,window,document),function(l){var o="mPS2id",r=mPS2id_params,c=r.shortcode_class,u=location.hash||null,h=function(e,t){try{l(e)}catch(e){return!1}return l(e).length&&(t||l("a[href*='"+e+"']").filter(function(){return 1==l(this).data(o+"Element")}).length)},f=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return{y:t[0]||"0",x:t[1]||"0"}},g=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return[t[0]||"0",t[1]||"0"]},d=function(e){"horizontal"!==e&&l(window).scrollTop(0),"vertical"!==e&&l(window).scrollLeft(0)},p=function(e,t){for(var n=e.click.length-1;0<=n;n--){var a=e.click[n];a&&"mPS2id"!=a.namespace&&('a[href*="#"]'===a.selector?a.selector='a[href*="#"]:not(._mPS2id-h)':"a[href*=#]:not([href=#])"===a.selector?a.selector="a[href*=#]:not([href=#]):not(._mPS2id-h)":a.selector&&-1!==a.selector.indexOf("mobmenu")?t.off("click"):t.off("click",a.handler))}},_="a[data-ps2id-api='true'][href*='#'],.ps2id > a[href*='#'],a.ps2id[href*='#']";l(document).ready(function(){for(var e=0;e<r.total_instances;e++){var t=l("[class*='ps2id-id-']");if(t.length&&t.each(function(){var e,t=l(this),n=t.attr("class").split(" ");if(!t.attr("id"))for(var a in n)if(String(n[a]).match(/^ps2id-id-\S+$/)){e=n[a].split("ps2id-id-")[1],l("#"+e).length||t.attr("id",e);break}}),"true"===r.instances[o+"_instance_"+e].scrollToHash&&u&&(l(r.instances[o+"_instance_"+e].selector+",."+c+","+_).not(r.instances[o+"_instance_"+e].excludeSelector).each(function(){l(this).data(o+"Element",!0)}),h(u,"true"===r.instances[o+"_instance_"+e].scrollToHashForAll))){var n="true"===r.instances[o+"_instance_"+e].scrollToHashRemoveUrlHash?window.location.href.replace(/#.*$/,""):window.location.href.replace(/#.*$/,"#");d(r.instances[o+"_instance_"+e].layout),window.history&&window.history.replaceState?window.history.replaceState("","",n):window.location.href=n}}}),l(window).on("load",function(){for(var e=0;e<r.total_instances;e++){var n=l(r.instances[o+"_instance_"+e].selector+",."+c+","+_),t=r.instances[o+"_instance_"+e].autoCorrectScroll,a=0;if(n.mPageScroll2id({scrollSpeed:r.instances[o+"_instance_"+e].scrollSpeed,autoScrollSpeed:"true"===r.instances[o+"_instance_"+e].autoScrollSpeed,scrollEasing:r.instances[o+"_instance_"+e].scrollEasing,scrollingEasing:r.instances[o+"_instance_"+e].scrollingEasing,pageEndSmoothScroll:"true"===r.instances[o+"_instance_"+e].pageEndSmoothScroll,layout:r.instances[o+"_instance_"+e].layout,offset:f(r.instances[o+"_instance_"+e].offset.toString()),highlightSelector:r.instances[o+"_instance_"+e].highlightSelector,clickedClass:r.instances[o+"_instance_"+e].clickedClass,targetClass:r.instances[o+"_instance_"+e].targetClass,highlightClass:r.instances[o+"_instance_"+e].highlightClass,forceSingleHighlight:"true"===r.instances[o+"_instance_"+e].forceSingleHighlight,keepHighlightUntilNext:"true"===r.instances[o+"_instance_"+e].keepHighlightUntilNext,highlightByNextTarget:"true"===r.instances[o+"_instance_"+e].highlightByNextTarget,disablePluginBelow:g(r.instances[o+"_instance_"+e].disablePluginBelow.toString()),appendHash:"true"===r.instances[o+"_instance_"+e].appendHash,onStart:function(){"true"===t&&"selector"===mPS2id.trigger&&a++},onComplete:function(){1==a&&(mPS2id.clicked.length&&mPS2id.clicked.trigger("click.mPS2id"),a=0)},excludeSelectors:r.instances[o+"_instance_"+e].excludeSelector}),"true"===r.instances[o+"_instance_"+e].scrollToHash&&u&&h(u,"true"===r.instances[o+"_instance_"+e].scrollToHashForAll)){d(r.instances[o+"_instance_"+e].layout);var s=r.instances[o+"_instance_"+e].scrollToHashUseElementData,i=l("a._mPS2id-h[href$='"+u+"'][data-ps2id-offset]:not([data-ps2id-offset=''])").last();setTimeout(function(){"true"===s&&i.length?i.trigger("click.mPS2id"):l.mPageScroll2id("scrollTo",u),-1!==window.location.href.indexOf("#")&&(window.history&&window.history.replaceState?window.history.replaceState("","",u):window.location.hash=u)},r.instances[o+"_instance_"+e].scrollToHashDelay)}"true"===r.instances[o+"_instance_"+e].unbindUnrelatedClickEvents&&setTimeout(function(){var e=n.length?l._data(n[0],"events"):null,t=n.length?l._data(l(document)[0],"events"):null;e&&p(e,n),t&&p(t,n)},300),"true"===r.instances[o+"_instance_"+e].normalizeAnchorPointTargets&&l("a._mPS2id-t[id]:empty").css({display:"inline-block","line-height":0,width:0,height:0,border:"none"}),"true"===r.instances[o+"_instance_"+e].stopScrollOnUserAction&&l(document).on("mousewheel DOMMouseScroll touchmove",function(){var e=l("html,body");e.is(":animated")&&e.stop()})}}),l.extend(l.expr[":"],{absolute:l.expr[":"].absolute||function(e){return"absolute"===l(e).css("position")},relative:l.expr[":"].relative||function(e){return"relative"===l(e).css("position")},static:l.expr[":"].static||function(e){return"static"===l(e).css("position")},fixed:l.expr[":"].fixed||function(e){return"fixed"===l(e).css("position")},width:l.expr[":"].width||function(e,t,n){var a=n[3].replace("&lt;","<").replace("&gt;",">");return!!a&&(">"===a.substr(0,1)?l(e).width()>a.substr(1):"<"===a.substr(0,1)?l(e).width()<a.substr(1):l(e).width()===parseInt(a))},height:l.expr[":"].height||function(e,t,n){var a=n[3].replace("&lt;","<").replace("&gt;",">");return!!a&&(">"===a.substr(0,1)?l(e).height()>a.substr(1):"<"===a.substr(0,1)?l(e).height()<a.substr(1):l(e).height()===parseInt(a))}})}(jQuery);
malihu-pagescroll2id.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page scroll to id
4
  Plugin URI: http://manos.malihu.gr/page-scroll-to-id
5
  Description: Page scroll to id is an easy-to-use jQuery plugin that enables animated (smooth) page scrolling to specific id within the document.
6
- Version: 1.6.5
7
  Author: malihu
8
  Author URI: http://manos.malihu.gr
9
  License: MIT License (MIT)
@@ -47,7 +47,7 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
47
 
48
  class malihuPageScroll2id{ // --edit--
49
 
50
- protected $version='1.6.5'; // Plugin version --edit--
51
  protected $update_option=null;
52
 
53
  protected $plugin_name='Page scroll to id'; // Plugin name --edit--
3
  Plugin Name: Page scroll to id
4
  Plugin URI: http://manos.malihu.gr/page-scroll-to-id
5
  Description: Page scroll to id is an easy-to-use jQuery plugin that enables animated (smooth) page scrolling to specific id within the document.
6
+ Version: 1.6.6
7
  Author: malihu
8
  Author URI: http://manos.malihu.gr
9
  License: MIT License (MIT)
47
 
48
  class malihuPageScroll2id{ // --edit--
49
 
50
+ protected $version='1.6.6'; // Plugin version --edit--
51
  protected $update_option=null;
52
 
53
  protected $plugin_name='Page scroll to id'; // Plugin name --edit--
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: page scrolling, page animation, smooth scroll, navigation, single-page navigation
5
  Requires at least: 3.3
6
  Tested up to: 5.2
7
- Stable tag: 1.6.5
8
  License: The MIT License (MIT)
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -100,6 +100,11 @@ Because it works and it already has a ton of features. The plugin has little dep
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
103
  = 1.6.5 =
104
 
105
  * Added new option to exclude specific selectors from being handled by the plugin.
@@ -238,6 +243,10 @@ Because it works and it already has a ton of features. The plugin has little dep
238
 
239
  == Upgrade Notice ==
240
 
 
 
 
 
241
  = 1.6.5 =
242
 
243
  Added "Page scroll to id target" block and new features for Gutenberg block editor, added exclude selectors option, added new offset options, fixed various issues and bugs.
4
  Tags: page scrolling, page animation, smooth scroll, navigation, single-page navigation
5
  Requires at least: 3.3
6
  Tested up to: 5.2
7
+ Stable tag: 1.6.6
8
  License: The MIT License (MIT)
9
  License URI: http://opensource.org/licenses/MIT
10
 
100
 
101
  == Changelog ==
102
 
103
+ = 1.6.6 =
104
+
105
+ * Fixed dynamic elements would not work automatically (issue in 1.6.5).
106
+ * Fixed some links would not get highlighted when using full URLs (issue in 1.6.5).
107
+
108
  = 1.6.5 =
109
 
110
  * Added new option to exclude specific selectors from being handled by the plugin.
243
 
244
  == Upgrade Notice ==
245
 
246
+ = 1.6.6 =
247
+
248
+ Fixed dynamic elements would not work automatically, fixed some links would not get highlighted when using full URLs.
249
+
250
  = 1.6.5 =
251
 
252
  Added "Page scroll to id target" block and new features for Gutenberg block editor, added exclude selectors option, added new offset options, fixed various issues and bugs.