PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 4.1.1
Responsive Menu – Create Mobile-Friendly Menu v4.1.1
4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 All 90 releases
responsive-menu / public / js / admin / additional.js

additional.js in Responsive Menu – Create Mobile-Friendly Menu 4.1.1, at public/js/admin/additional.js

80 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 /* --> Hide Pro Options */
22 $(document).on('change', '#hide-pro-options', function() {
23 if($(this).is(':checked')) {
24 $('.nav > li.pro-tab, ' +
25 '.fully-pro-container, ' +
26 '.responsive-menu-preview, ' +
27 '.pro-row'
28 ).hide();
29 } else {
30 $('.nav > li.pro-tab, ' +
31 '.fully-pro-container, ' +
32 '.responsive-menu-preview, ' +
33 '.pro-row'
34 ).show();
35 }
36 });
37 /* <-- End Hide Pro Options */
38
39 /* --> Preview Options */
40 $(document).on('click', '.responsive-menu-preview', function(e) {
41 e.preventDefault();
42 var form = $('#responsive-menu-form');
43 form.attr('action', WP_RMP.HOME_URL + '?responsive-menu-preview=true');
44 form.attr('target', '_blank');
45 form.submit();
46 form.attr('action', '');
47 form.attr('target', '');
48 });
49 /* <-- End Preview Options */
50
51 /** Move to new version */
52 jQuery('.rmp-upgrade-version').on( 'click', function(e) {
53 e.preventDefault();
54 jQuery.ajax({
55 url: ajaxurl,
56 data: { action : 'rmp_switch_version' },
57 type: 'POST',
58 dataType: 'json',
59 error: function( error ) {
60 jQuery(this).prop('disabled', false);
61 },
62 success: function( response ) {
63 if ( response.data.redirect ) {
64 location.href = response.data.redirect;
65 }
66 }
67 });
68 });
69
70 /** Call ajax to hide admin notice permanent. */
71 $( '.rmp-version-upgrade-notice' ).on( 'click', '.notice-dismiss', function( event ) {
72 event.preventDefault();
73 jQuery.ajax( {
74 type: "POST",
75 url: ajaxurl,
76 data: "action=rmp_version_admin_notice_dismiss",
77 });
78 });
79
80 });