(function($){
'use strict';
$(function(){
/*
let visited_ids=localStorage.getItem('visited_products');
let ids_to_send=JSON.stringify(visited_ids);
console.log(JSON.parse(visited_ids));
console.log('test');
$.ajax({
type: 'POST',
url: ns_template_ajax_obj.ajaxurl,
data:{
action: 'get_single_prod_page_ids',
visited_prods: visited_ids
},
success:function(data){
console.log(data);
},
complete:function(data){
},
error: function(errorThrown){
console.log(errorThrown);
}});
*/
/*
var variation_featured_img;
$(".single_variation_wrap").on("show_variation", function(event, variation){
variation_featured_img=variation.image['full_src'];
$.ajax({
url: ns_template_ajax_obj.ajaxurl,
type: 'POST',
data: {
'action': 'get_variation_featured_image',
'featured_image':variation_featured_img,
'nonce':ns_template_ajax_obj.nonce
},
success:function(data){
console.log(data);
},
complete:function(data){
},
error: function(errorThrown){
console.log(errorThrown);
}});
console.log(variation);
});
*/
/*
var selected_country;
$("body").on("country_to_state_changed", function(){
if($('.woocommerce-billing-fields select#billing_country').val()!='SI'){
selected_country='hide_payment';
}else{
selected_country='show_payment';
}
$.ajax({
url: ns_template_ajax_obj.ajaxurl,
type: 'POST',
data: {
'action': 'get_selected_country',
'selected_country':selected_country,
'nonce':ns_template_ajax_obj.nonce
},
success:function(data){
console.log(data);
},
complete:function(data){
},
error: function(errorThrown){
console.log(errorThrown);
}});
});
*/
});
/*
* When the window is loaded:
*
* $(window).load(function(){
*
* });
*
* ...and/or other possibilities.
*
* Ideally, it is not considered best practise to attach more than a
* single DOM-ready or window-load handler for a particular page.
* Although scripts in the WordPress core, Plugins and Themes may be
* practising this, we should strive to set a better example in our own work.
*/
})(jQuery);