PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.5.9
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.5.9
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
detectmobilebrowser.js 4 years ago iris-script.js 4 years ago mystickymenu-admin.js 4 years ago mystickymenu.js 4 years ago mystickymenu.min.js 5 years ago select2.min.js 4 years ago
iris-script.js
175 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": 99,
17 "per_month":8.5,
18 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=28"
19 },
20 "2_year": {
21 "price": 149,
22 "per_month":6.5,
23 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=29"
24 },
25 "lifetime": {
26 "price": 249,
27 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=30"
28 }
29 },
30 "500_websites": {
31 "1_year": {
32 "price": 179,
33 "per_month":15,
34 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=31"
35 },
36 "2_year": {
37 "price": 269,
38 "per_month":11.5,
39 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=32"
40 },
41 "lifetime": {
42 "price": 499,
43 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=33"
44 }
45 },
46 "1000_websites": {
47 "1_year": {
48 "price": 249,
49 "per_month":21,
50 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=34"
51 },
52 "2_year": {
53 "price": 375,
54 "per_month":16,
55 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=35"
56 },
57 "lifetime": {
58 "price": 619,
59 "link": "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=36"
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).offset().top - $(window).scrollTop() - $(window).height() < -3) {
164 $(this).closest(".price-table").removeClass("is-fixed");
165 $(this).closest(".price-table").find(".price-table-bottom").prop("style", "");
166 } else {
167 $(this).closest(".price-table").addClass("is-fixed");
168 $(this).closest(".price-table").find(".price-table-bottom").css("top", ($(window).height() - 125 )+"px");
169 $(this).closest(".price-table").find(".price-table-bottom").css("left", $(this).offset().left+"px");
170 $(this).closest(".price-table").find(".price-table-bottom").outerWidth($(this).closest(".price-table").width());
171 }
172 });
173 }
174 });
175 }));