detectmobilebrowser.js
5 years ago
iris-script.js
5 years ago
mystickymenu-admin.js
5 years ago
mystickymenu.js
5 years ago
mystickymenu.min.js
5 years ago
select2.min.js
5 years ago
iris-script.js
59 lines
| 1 | var priceOptions = {"50_websites":{"1_year":{"price":79,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=3"},"2_year":{"price":125,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=15"},"lifetime":{"price":199,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=9"}},"500_websites":{"1_year":{"price":139,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=16"},"2_year":{"price":225,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=17"},"lifetime":{"price":359,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=18"}},"1000_websites":{"1_year":{"price":199,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=19"},"2_year":{"price":315,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=20"},"lifetime":{"price":499,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=21"}}}; |
| 2 | jQuery(document).ready(function($){ |
| 3 | jQuery('.my-color-field').wpColorPicker(); |
| 4 | jQuery(document).on('click', '.sticky-header-upgrade-now', function(e){ |
| 5 | e.preventDefault(); |
| 6 | jQuery(".sticky-header-menu ul li a:last").trigger("click"); |
| 7 | }); |
| 8 | |
| 9 | if(jQuery(".multiple-options").length) { |
| 10 | jQuery(".multiple-options").select2({ |
| 11 | minimumResultsForSearch: -1 |
| 12 | }); |
| 13 | } |
| 14 | if(jQuery(".multiple-web-options").length) { |
| 15 | jQuery(".multiple-web-options").select2({ |
| 16 | minimumResultsForSearch: -1 |
| 17 | }); |
| 18 | } |
| 19 | jQuery(document).on("change", ".multiple-options", function(){ |
| 20 | priceText = jQuery(this).find("option:selected").attr("data-header"); |
| 21 | thisValue = jQuery(this).val(); |
| 22 | thisPrice = jQuery(this).find("option:selected").attr("data-price"); |
| 23 | if(!jQuery(this).hasClass("has-multiple-websites")) { |
| 24 | jQuery(this).closest(".price-table").find("a.cart-link").attr("href", thisValue); |
| 25 | jQuery(this).closest(".price-table").find(".plan-price").text("$" + thisPrice); |
| 26 | } else { |
| 27 | var webOption = jQuery(".multiple-web-options").val(); |
| 28 | var priceSettings = priceOptions[webOption]; |
| 29 | var yearPlan = jQuery(".multiple-options.has-multiple-websites option:selected").attr("data-option"); |
| 30 | if(priceSettings[yearPlan] != undefined) { |
| 31 | priceSettings = priceSettings[yearPlan]; |
| 32 | thisValue = priceSettings.link; |
| 33 | thisPrice = priceSettings.price; |
| 34 | } |
| 35 | } |
| 36 | thisOption = jQuery(this).find("option:selected").attr("data-option"); |
| 37 | if(thisOption == "1_year") { |
| 38 | thisPrice = thisPrice+"<span>/year</span>"; |
| 39 | priceText = "Renewals for <b>25% off</b>"; |
| 40 | } else if(thisOption == "2_year") { |
| 41 | thisPrice = thisPrice+"<span>/2 years</span>"; |
| 42 | priceText = "Renewals for <b>25% off</b>"; |
| 43 | } else { |
| 44 | thisPrice = thisPrice+"<span>/lifetime</span>"; |
| 45 | priceText = "For lifetime"; |
| 46 | } |
| 47 | jQuery(this).closest(".price-table").find("a.cart-link").attr("href", thisValue); |
| 48 | jQuery(this).closest(".price-table").find(".plan-price").html("$" + thisPrice); |
| 49 | jQuery(this).closest(".price-table").find(".price-offer").html(priceText); |
| 50 | }); |
| 51 | |
| 52 | jQuery(document).on("change", ".multiple-web-options", function(){ |
| 53 | jQuery(".multiple-options.has-multiple-websites").trigger("change"); |
| 54 | }); |
| 55 | |
| 56 | if(jQuery(".multiple-options.has-multiple-websites").length) { |
| 57 | jQuery(".multiple-options.has-multiple-websites").trigger("change"); |
| 58 | } |
| 59 | }); |