$(document).keypress(function(e) { if(e.which == 13) { var name = $("#inp-ind").val(); var city = $("#inp-ind-city").val(); if(name == "" && city == "") { var products = $("#products").val(); window.location = "http://www.lebordeluche.com/store/search/result/scroll/index.php"; } else { window.location = "http://www.lebordeluche.com/store/search/result/scroll/index.php?search=simple&name=" + name + "&city=" + city; } } }); $(document).on('click', '.close-in', function() { var item = $(this).parent().attr('value'); var val = $(this).parent().attr('category'); $.get("http://www.lebordeluche.com/store/api/items.php?action=delete&item=" + item + "&category=" + val, function(data, status) { //alert(data); }); $(this).parent().remove(); }); $(document).ready(function(e) { $.get("http://www.lebordeluche.com/store/ajax.php", function(data, status) { var data = JSON.parse(data); if(data.logged == true && data.admin == true) { var element = 'Déconnexion Control'; $(".tp-link").append(element); $(".search-in").html('Statistiques '); $(".search-in").attr('alt', 'admin'); $(".search-bt").attr('alt', 'admin'); } else if(data.logged == true) { var element = 'Déconnexion Control'; $(".tp-link").append(element); $(".search-in").html('Qualification '); $(".search-in").attr('alt', 'control'); $(".search-bt").attr('alt', 'control'); } }); $.get("http://www.lebordeluche.com/store/api/basket.php", function(data, status) { data = JSON.parse(data); Object.keys(data).forEach(function(key) { var value = key; Object.keys(data[key]).forEach(function(name) { name = data[key][name]; var item = '
' + name + '
'; $('.cartfl').append(item); }); }); }); $(".search-in").click(function(e) { e.preventDefault(); var products = $("#products").val(); //alert(products); if($(this).attr("alt") == 'admin') { window.location = "http://www.lebordeluche.com/store/states/"; } else if($(this).attr("alt") == 'control') { window.location = "http://www.lebordeluche.com/services/control/index.php/update"; } else { window.location = "http://www.lebordeluche.com/store/search/result/scroll/index.php"; } }); /* wow = new WOW( { animateClass: 'animated', offset: 100, callback: function(box) { console.log("WOW: animating <" + box.tagName.toLowerCase() + ">") } }); wow.init();*/ })
Error