PageSourceSearch

https://wpjobster.com/wp-content/plugins/iphorm-form-builder/js/jquery.smooth-scroll.min.js?ver=1.7.2

js wpjobster.com collected 2026-09-24 09:01:01 UTC 5,263 bytes, 16 lines download raw bytes

1/*!
2 * jQuery Smooth Scroll - v1.7.2 - 2016-01-23
3 * https://github.com/kswedberg/jquery-smooth-scroll
4 * Copyright (c) 2016 Karl Swedberg
5 * Licensed MIT
6 *
7 * Modified by ThemeCatcher to be compatible with jQuery Tools Scrollable
8 * The following code was removed from the original file:
9 *
10 *   scrollable: function(dir) {
11 *     var scrl = getScrollable.call(this, {dir: dir});
12 *
13 *     return this.pushStack(scrl);
14 *   },
15 */
16(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module==="object"&&module.exports){factory(require("jquery"))}else{factory(jQuery)}})(function($){var version="1.7.2";var optionOverrides={};var defaults={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:true};var getScrollable=function(opts){var scrollable=[];var scrolled=false;var dir=opts.dir&&opts.dir==="left"?"scrollLeft":"scrollTop";this.each(function(){var el=$(this);if(this===document||this===window){return}if(document.scrollingElement&&(this===document.documentElement||this===document.body)){scrollable.push(document.scrollingElement);return false}if(el[dir]()>0){scrollable.push(this)}else{el[dir](1);scrolled=el[dir]()>0;if(scrolled){scrollable.push(this)}el[dir](0)}});if(!scrollable.length){this.each(function(){if(this===document.documentElement&&$(this).css("scrollBehavior")==="smooth"){scrollable=[this]}if(!scrollable.length&&this.nodeName==="BODY"){scrollable=[this]}})}if(opts.el==="first"&&scrollable.length>1){scrollable=[scrollable[0]]}return scrollable};$.fn.extend({firstScrollable:function(dir){var scrl=getScrollable.call(this,{el:"first",dir:dir});return this.pushStack(scrl)},smoothScroll:function(options,extra){options=options||{};if(options==="options"){if(!extra){return this.first().data("ssOpts")}return this.each(function(){var $this=$(this);var opts=$.extend($this.data("ssOpts")||{},extra);$(this).data("ssOpts",opts)})}var opts=$.extend({},$.fn.smoothScroll.defaults,options);var clickHandler=function(event){var escapeSelector=function(str){return str.replace(/(:|\.|\/)/g,"\\$1")};var link=this;var $link=$(this);var thisOpts=$.extend({},opts,$link.data("ssOpts")||{});var exclude=opts.exclude;var excludeWithin=thisOpts.excludeWithin;var elCounter=0;var ewlCounter=0;var include=true;var clickOpts={};var locationPath=$.smoothScroll.filterPath(location.pathname);var linkPath=$.smoothScroll.filterPath(link.pathname);var hostMatch=location.hostname===link.hostname||!link.hostname;var pathMatch=thisOpts.scrollTarget||linkPath===locationPath;var thisHash=escapeSelector(link.hash);if(thisHash&&!$(thisHash).length){include=false}if(!thisOpts.scrollTarget&&(!hostMatch||!pathMatch||!thisHash)){include=false}else{while(include&&elCounter<exclude.length){if($link.is(escapeSelector(exclude[elCounter++]))){include=false}}while(include&&ewlCounter<excludeWithin.length){if($link.closest(excludeWithin[ewlCounter++]).length){include=false}}}if(include){if(thisOpts.preventDefault){event.preventDefault()}$.extend(clickOpts,thisOpts,{scrollTarget:thisOpts.scrollTarget||thisHash,link:link});$.smoothScroll(clickOpts)}};if(options.delegateSelector!==null){this.undelegate(options.delegateSelector,"click.smoothscroll").delegate(options.delegateSelector,"click.smoothscroll",clickHandler)}else{this.unbind("click.smoothscroll").bind("click.smoothscroll",clickHandler)}return this}});$.smoothScroll=function(options,px){if(options==="options"&&typeof px==="object"){return $.extend(optionOverrides,px)}var opts,$scroller,scrollTargetOffset,speed,delta;var scrollerOffset=0;var offPos="offset";var scrollDir="scrollTop";var aniProps={};var aniOpts={};if(typeof options==="number"){opts=$.extend({link:null},$.fn.smoothScroll.defaults,optionOverrides);scrollTargetOffset=options}else{opts=$.extend({link:null},$.fn.smoothScroll.defaults,options||{},optionOverrides);if(opts.scrollElement){offPos="position";if(opts.scrollElement.css("position")==="static"){opts.scrollElement.css("position","relative")}}}scrollDir=opts.direction==="left"?"scrollLeft":scrollDir;if(opts.scrollElement){$scroller=opts.scrollElement;if(!/^(?:HTML|BODY)$/.test($scroller[0].nodeName)){scrollerOffset=$scroller[scrollDir]()}}else{$scroller=$("html, body").firstScrollable(opts.direction)}opts.beforeScroll.call($scroller,opts);scrollTargetOffset=typeof options==="number"?options:px||$(opts.scrollTarget)[offPos]()&&$(opts.scrollTarget)[offPos]()[opts.direction]||0;aniProps[scrollDir]=scrollTargetOffset+scrollerOffset+opts.offset;speed=opts.speed;if(speed==="auto"){delta=Math.abs(aniProps[scrollDir]-$scroller[scrollDir]());speed=delta/opts.autoCoefficient}aniOpts={duration:speed,easing:opts.easing,complete:function(){opts.afterScroll.call(opts.link,opts)}};if(opts.step){aniOpts.step=opts.step}if($scroller.length){$scroller.stop().animate(aniProps,aniOpts)}else{opts.afterScroll.call(opts.link,opts)}};$.smoothScroll.version=version;$.smoothScroll.filterPath=function(string){string=string||"";return string.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")};$.fn.smoothScroll.defaults=defaults});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.