| 1 |
jQuery(document).ready(function() { |
| 2 |
jQuery(document) |
| 3 |
.on('click', '#onboarding-save-display-btn', handleSettingSave); |
| 4 |
|
| 5 |
// A Function send the array of setting to ajax.php |
| 6 |
function handleSettingSave() { |
| 7 |
// Fetch all the settings |
| 8 |
var settings = lasso_lite_helper.fetchAllOptions(); |
| 9 |
|
| 10 |
// Prepare data |
| 11 |
var data = { |
| 12 |
action: 'lasso_lite_store_settings', |
| 13 |
security: lassoLiteOptionsData.optionsNonce, |
| 14 |
settings: settings, |
| 15 |
}; |
| 16 |
|
| 17 |
// Send the POST request |
| 18 |
jQuery.post(ajaxurl, data, function (response) { |
| 19 |
console.log('response', response); |
| 20 |
}); |
| 21 |
|
| 22 |
go_to_next_step_action(this); |
| 23 |
} |
| 24 |
}); |
| 25 |
|
| 26 |
|