bopo-frontend.js
3 years ago
bopo-frontend.min.js
3 years ago
bopo-product.js
2 weeks ago
bopo-product.min.js
3 years ago
bopo-settings.js
4 years ago
bopo-settings.min.js
4 years ago
dropdown.min.js
4 years ago
select2.js
4 years ago
select2.min.js
4 years ago
shortcode-scripts.js
3 years ago
shortcode-scripts.min.js
4 years ago
transition.min.js
4 years ago
bopo-settings.js
49 lines
| 1 | jQuery(document).ready(function ($) { |
| 2 | 'use strict'; |
| 3 | /*Color picker*/ |
| 4 | $('.vi-ui.dropdown').dropdown(); |
| 5 | |
| 6 | $('.color-picker').iris({ |
| 7 | change: function (event, ui) { |
| 8 | $(this).parent().find('.color-picker').css({backgroundColor: ui.color.toString()}); |
| 9 | let ele = $(this).data('ele'); |
| 10 | if (ele == 'highlight') { |
| 11 | $('#message-purchased').find('a').css({'color': ui.color.toString()}); |
| 12 | } else if (ele == 'textcolor') { |
| 13 | $('#message-purchased').css({'color': ui.color.toString()}); |
| 14 | } else { |
| 15 | $('#message-purchased').css({backgroundColor: ui.color.toString()}); |
| 16 | } |
| 17 | }, |
| 18 | hide: true, |
| 19 | border: true |
| 20 | }).click(function () { |
| 21 | $('.iris-picker').hide(); |
| 22 | $(this).closest('td').find('.iris-picker').show(); |
| 23 | }); |
| 24 | |
| 25 | $('body').click(function () { |
| 26 | $('.iris-picker').hide(); |
| 27 | }); |
| 28 | $('.color-picker').click(function (event) { |
| 29 | event.stopPropagation(); |
| 30 | }); |
| 31 | |
| 32 | $('.bopobb-create-product').on('click', function () { |
| 33 | $.ajax({ |
| 34 | type: 'POST', |
| 35 | url: bopobb_ajax_url, |
| 36 | data: { |
| 37 | action: 'bopobb_first_bopobb_link', |
| 38 | nonce: $('#bopobb_nonce_field').val(), |
| 39 | }, |
| 40 | success: function (response) { |
| 41 | $('.bopobb-create-product').parent().fadeOut(300); |
| 42 | }, |
| 43 | error: function (err) { |
| 44 | $('.bopobb-create-product').parent().fadeOut(300); |
| 45 | } |
| 46 | }); |
| 47 | }) |
| 48 | |
| 49 | }); |