I\'m trying to write a method to catch user clicks on a site menu, but I want the process to be silent for the user, mainly, that when a user hovers over an anchor tag, it w
Try This
Then this in jquery:
$(".selectAnchor, .menuAnchor").click(function(event){
event.preventDefault();
console.log(event.target.nodeName);
//event.preventDefault();
$.ajax({
type: 'POST',
url: 'http://localsite/menuRedirect.php',
data: {id:0, module:'Module',source:'Source'},
complete: function(data){
console.log("DONE");
window.location = "http://www.google.com"
}
});
});