PageSourceSearch

https://transloads.co/wp-content/cache/min/1/wp-content/plugins/su…/gpopover/jquery.gpopover.js?ver=1784931481

js transloads.co collected 2026-09-25 14:49:50 UTC 3,092 bytes, 17 lines download raw bytes

1(function($){var GPopover=function(element,options){this.options=null;this.$trigger=null;this.$popover=null;this.init(element,options)}
2GPopover.prototype.init=function(element,options){var that=this;this.options=$.extend({},$.fn.gpopover.defaults,options);this.$trigger=$(element);this.$popover=$('#'+this.$trigger.data('popover'));this._addArrowElements();if(this.options.preventHide){this._preventHideClickPropagation()}
3this.$trigger.click(function(e){if(!that.$popover.is(":visible")){$(this).parent().click();that.show();e.stopPropagation()}
4e.preventDefault()})}
5GPopover.prototype.show=function(){var that=this;this.$popover.width(this.options.width);this.$popover.fadeIn(this.options.fadeInDuration);$(document).one('click.popoverHide',function(){that.hide()});var triggerPos=this.$trigger.offset();this.$popover.offset({left:(triggerPos.left+(this.$trigger.outerWidth()/2))-(this.$popover.outerWidth()/2),top:triggerPos.top+this.$trigger.outerHeight()+10});var positionXCorrection=this._repositionForViewportSides();this._setArrowPosition(positionXCorrection);this.options.onShow.call(this.$trigger,this.$popover)}
6GPopover.prototype.hide=function(){this.$popover.fadeOut(this.options.fadeOutDuration);this.options.onHide.call(this.$trigger,this.$popover)}
7GPopover.prototype._addArrowElements=function(){this.$arrow=$('<div class="gpopover-arrow"></div>');this.$arrowShadow=$('<div class="gpopover-arrow-shadow"></div>');this.$popover.append(this.$arrow);this.$popover.append(this.$arrowShadow)}
8GPopover.prototype._preventHideClickPropagation=function(){this.$popover.click(function(e){e.stopPropagation()})}
9GPopover.prototype._repositionForViewportSides=function(){var popoverOffsetLeft=this.$popover.offset().left,positionXCorrection=0,$window=$(window);if(popoverOffsetLeft+this.$popover.outerWidth()+this.options.viewportSideMargin>$window.width()){var rightEdgeCorrection=-((popoverOffsetLeft+this.$popover.outerWidth()+this.options.viewportSideMargin)-$window.width());popoverOffsetLeft=popoverOffsetLeft+rightEdgeCorrection
10positionXCorrection=rightEdgeCorrection}
11if(popoverOffsetLeft<this.options.viewportSideMargin){var leftEdgeCorrection=this.options.viewportSideMargin-popoverOffsetLeft;popoverOffsetLeft=popoverOffsetLeft+leftEdgeCorrection
12positionXCorrection+=leftEdgeCorrection}
13if(positionXCorrection!==0){this.$popover.offset({left:popoverOffsetLeft})}
14return positionXCorrection}
15GPopover.prototype._setArrowPosition=function(positionXCorrection){var leftPosition=(this.$popover.outerWidth()/2)-(this.$arrow.outerWidth()/2)-positionXCorrection;this.$arrow.css({top:-7,left:leftPosition});this.$arrowShadow.css({top:-8,left:leftPosition})}
16$.fn.gpopover=function(option){return this.each(function(){var $this=$(this),data=$this.data('gpopover'),options=(typeof option=='object'&&option);if(!data){data=new GPopover(this,options);$this.data('gpopover',data)}
17if(typeof option=='string')data[option]()})};$.fn.gpopover.defaults={width:250,fadeInDuration:65,fadeOutDuration:65,viewportSideMargin:10,preventHide:!1,onShow:function(){},onHide:function(){}}})(jQuery)

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.