Hi
I would like you to help me solve this problem. The Ajax request below, meant to list product items from a php file does not work when I put it after the <body> tag in the file shop-3-left-sidebar.html however it works when I place between the <head> tags. Thank you.
<script>
// Show items
$.ajax({
type: "GET",
url: "ajax/products.php",
data: { department: <?php echo $_GET["department"]; ?>, category: <?php echo $_GET["category"]; ?> },
success: function(result){
$("#shop").html(result);
},
error: function(){
alert('Error');
}
});
</script>