PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.6.7
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.6.7
2.9.1 2.9.0 2.8.9 2.8.8 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 2.0 2.0.1 2.0.3 2.0.4 2.0.5 2.0.6 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7
mystickymenu / js / iris-script.js
mystickymenu / js Last commit date
morphext 3 years ago detectmobilebrowser.js 3 years ago iris-script.js 3 years ago jquery.star-rating-svg.min.js 3 years ago mystickymenu-admin.js 2 years ago mystickymenu.js 3 years ago mystickymenu.min.js 5 years ago select2.min.js 3 years ago slick.min.js 3 years ago welcomebar-front.js 2 years ago
iris-script.js
218 lines
1 (function (factory) {
2 "use strict";
3 if (typeof define === 'function' && define.amd) {
4 define(['jquery'], factory);
5 }
6 else if(typeof module !== 'undefined' && module.exports) {
7 module.exports = factory(require('jquery'));
8 }
9 else {
10 factory(jQuery);
11 }
12 }(function ($, undefined) {
13 var priceOptions = {
14 "50_websites": {
15 "1_year": {
16 "price": 149,
17 "per_month":12.5,
18 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=43"
19 },
20 "2_year": {
21 "price": 229,
22 "per_month":10.0,
23 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=44"
24 },
25 "lifetime": {
26 "price": 389,
27 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=45"
28 }
29 },
30 "500_websites": {
31 "1_year": {
32 "price": 279,
33 "per_month":23.5,
34 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=46"
35 },
36 "2_year": {
37 "price": 419,
38 "per_month":17.5,
39 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=47"
40 },
41 "lifetime": {
42 "price": 699,
43 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=48"
44 }
45 },
46 "1000_websites": {
47 "1_year": {
48 "price": 389,
49 "per_month":32.5,
50 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=49"
51 },
52 "2_year": {
53 "price": 585,
54 "per_month":24.5,
55 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=50"
56 },
57 "lifetime": {
58 "price": 959,
59 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=51"
60 }
61 }
62 };
63 $(document).ready(function($){
64 $('.my-color-field').wpColorPicker();
65 $(document).on('click', '.sticky-header-upgrade-now', function(e){
66 //e.preventDefault();
67 //$(".sticky-header-menu ul li a:last").trigger("click");
68 });
69
70 $(document).on("click", ".pricing-table-content", function(){
71 if(!$(this).hasClass("active")) {
72 $(".pricing-table-content").removeClass("active");
73 $(this).addClass("active");
74 var datFor = $(this).data("option");
75 $(".multiple-options").each(function(){
76 $(this).find("option").prop("selected", false);
77 $(this).find("option[data-option='"+datFor+"']").prop("selected", true);
78 $(this).trigger("change");
79 })
80 }
81 });
82
83 if($(".multiple-options").length) {
84 $(".multiple-options").select2({
85 minimumResultsForSearch: -1
86 });
87 }
88 if($(".multiple-web-options").length) {
89 $(".multiple-web-options").select2({
90 minimumResultsForSearch: -1
91 });
92 }
93
94
95 $(document).on("change", ".multiple-options", function(){
96
97 priceText = $(this).find("option:selected").attr("data-header");
98 thisValue = $(this).val();
99 thisPrice = $(this).find("option:selected").attr("data-price");
100 thisperMonth = $(this).find("option:selected").attr("data-per-month");
101 console.log("thisperMonth == " + thisperMonth);
102 if(!$(this).hasClass("has-multiple-websites")) {
103 $(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
104 $(this).closest(".price-table").find(".plan-price").text("$" + thisPrice);
105 } else {
106 var webOption = $(".multiple-web-options").val();
107 var priceSettings = priceOptions[webOption];
108 var yearPlan = $(".multiple-options.has-multiple-websites option:selected").attr("data-option");
109
110 if(priceSettings[yearPlan] != undefined) {
111 priceSettings = priceSettings[yearPlan];
112 thisValue = priceSettings.link;
113 thisPrice = priceSettings.price;
114 thisperMonth = priceSettings.per_month;
115 }
116 }
117 thisOption = $(this).find("option:selected").attr("data-option");
118 if(thisOption == "1_year") {
119 thisPrice = thisPrice+"<span>/year</span>";
120 per_month = "Less than <b>$" + thisperMonth + "</b>/mo · <b>Billed Annually</b>";
121 priceText = "Renewals for <b>25% off</b>";
122 } else if(thisOption == "2_year") {
123 thisPrice = thisPrice+"<span>/2 years</span>";
124 per_month = "Less than <b>$" + thisperMonth + "</b>/mo · <b>Billed Annually</b>";
125 priceText = "Renewals for <b>25% off</b>";
126 } else {
127 thisPrice = thisPrice+"<span>/lifetime</span>";
128 per_month = "<b>Best value</b>";
129 priceText = "For lifetime";
130 }
131
132 $(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
133 $(this).closest(".price-table").find(".plan-price").html("$" + thisPrice);
134 $(this).closest(".price-table").find(".price-offer").html(priceText);
135 $(this).closest(".price-table").find(".price-permonth").html(per_month);
136
137 if ( per_month == '' ) {
138 $(this).closest(".price-table").find(".price-permonth").hide();
139 } else {
140 $(this).closest(".price-table").find(".price-permonth").show();
141 }
142
143 });
144
145 $(document).on("change", ".multiple-web-options", function(){
146 $(".multiple-options.has-multiple-websites").trigger("change");
147 });
148
149 if($(".multiple-options.has-multiple-websites").length) {
150 $(".multiple-options.has-multiple-websites").trigger("change");
151 }
152 checkForPricingPos();
153 $(window).on("scroll", function(){
154 checkForPricingPos();
155 });
156
157 $(window).on("resize", function(){
158 checkForPricingPos();
159 });
160
161 function checkForPricingPos() {
162 $(".bottom-position").each(function(){
163 if($(this).closest(".price-table").find(".on-screen-pos").length) {
164 var toolPos = $(this).closest(".price-table").find(".on-screen-pos").offset().top - $(window).scrollTop() - $(window).height();
165 if(toolPos < 0) {
166 if ($(this).offset().top - $(window).scrollTop() - $(window).height() < -3) {
167 $(this).closest(".price-table").removeClass("is-fixed");
168 $(this).closest(".price-table").find(".price-table-bottom").prop("style", "");
169 } else {
170 $(this).closest(".price-table").addClass("is-fixed");
171 $(this).closest(".price-table").find(".price-table-bottom").css("top", ($(window).height() - 125) + "px");
172 $(this).closest(".price-table").find(".price-table-bottom").css("left", $(this).offset().left + "px");
173 $(this).closest(".price-table").find(".price-table-bottom").outerWidth($(this).closest(".price-table").width());
174 }
175 } else {
176 $(this).closest(".price-table").removeClass("is-fixed");
177 $(this).closest(".price-table").find(".price-table-bottom").prop("style", "");
178 }
179 }
180 });
181 setTooltipPosition();
182 }
183
184 function setTooltipPosition() {
185 if($(".html-tooltip:not(.no-position)").length) {
186 $(".html-tooltip:not(.no-position)").each(function(){
187 if($(this).offset().top - $(window).scrollTop() > 540) {
188 $(this).addClass("top").removeClass("side").removeClass("bottom");
189 $(this).find(".tooltip-text").attr("style","");
190 $(this).find(".tooltip-text").removeClass("hide-arrow");
191 } else if($(window).height() - ($(this).offset().top - $(window).scrollTop()) > 460) {
192 $(this).addClass("bottom").removeClass("top").removeClass("side");
193 $(this).find(".tooltip-text").attr("style","");
194 $(this).find(".tooltip-text").removeClass("hide-arrow");
195 } else {
196 $(this).addClass("side").removeClass("top").removeClass("bottom");
197 if($(this).find(".tooltip-text").length) {
198 $(this).find(".tooltip-text").attr("style","");
199 $(this).find(".tooltip-text").removeClass("hide-arrow");
200
201 if($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50 < 0) {
202 $(this).find(".tooltip-text").css("margin-top", Math.abs($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50)+"px");
203 $(this).find(".tooltip-text").addClass("hide-arrow");
204 } else {
205 $(this).find(".tooltip-text").attr("style","");
206 if(($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) > 0) {
207 $(this).find(".tooltip-text").css("margin-top", ((-1)*Math.abs($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) - 10)+"px");
208 $(this).find(".tooltip-text").addClass("hide-arrow");
209 }
210 }
211 }
212 }
213 });
214 }
215 }
216 });
217 }));
218