| 1 |
/** |
| 2 |
Responsive Menu JS file. |
| 3 |
NOT Safe to Copy |
| 4 |
|
| 5 |
Do Not Copy |
| 6 |
**/ |
| 7 |
|
| 8 |
jQuery(function($) { |
| 9 |
|
| 10 |
/* --> Colour Select Options */ |
| 11 |
$.minicolors.defaults = $.extend( |
| 12 |
$.minicolors.defaults, { |
| 13 |
format: 'hex', |
| 14 |
opacity: false, |
| 15 |
theme: 'bootstrap' |
| 16 |
} |
| 17 |
); |
| 18 |
$('.mini-colours').minicolors(); |
| 19 |
/* <-- End Colour Select Options */ |
| 20 |
|
| 21 |
/* --> Upgrade Message Overlay */ |
| 22 |
$('.pro-row td.col-right, .pro-container').append( |
| 23 |
'<div class="responsive-menu-pro-overlay">' + |
| 24 |
'<a href="https://responsive.menu/pricing/?utm_source=free-plugin' + |
| 25 |
'&utm_medium=option&utm_campaign=free-plugin-option-upgrade"' + |
| 26 |
'target="_blank">Click to upgrade now to use</a>' + |
| 27 |
'</div>' |
| 28 |
); |
| 29 |
/* <-- End Upgrade Message Overlay */ |
| 30 |
|
| 31 |
/* --> Hide Pro Options */ |
| 32 |
$(document).on('change', '#hide-pro-options', function() { |
| 33 |
if($(this).is(':checked')) { |
| 34 |
$('.nav > li.pro-tab, ' + |
| 35 |
'.fully-pro-container, ' + |
| 36 |
'.responsive-menu-preview, ' + |
| 37 |
'.pro-row' |
| 38 |
).hide(); |
| 39 |
} else { |
| 40 |
$('.nav > li.pro-tab, ' + |
| 41 |
'.fully-pro-container, ' + |
| 42 |
'.responsive-menu-preview, ' + |
| 43 |
'.pro-row' |
| 44 |
).show(); |
| 45 |
} |
| 46 |
}); |
| 47 |
/* <-- End Hide Pro Options */ |
| 48 |
|
| 49 |
/* --> Preview Options */ |
| 50 |
$(document).on('click', '.responsive-menu-preview', function(e) { |
| 51 |
e.preventDefault(); |
| 52 |
var form = $('#responsive-menu-form'); |
| 53 |
form.attr('action', WP_HOME_URL + '?responsive-menu-preview=true'); |
| 54 |
form.attr('target', '_blank'); |
| 55 |
form.submit(); |
| 56 |
form.attr('action', ''); |
| 57 |
form.attr('target', ''); |
| 58 |
}); |
| 59 |
/* <-- End Preview Options */ |
| 60 |
|
| 61 |
}); |