Help, simple Problem...
Help, simple Problem...
Hi,
I have a problem with a small jquery code:
-
$(function() {
$(".nav").click(function(event){
var url = $(this).attr('href');
alert(url);
$("#content > *").slideUp();
$.post(url,{ ajax: "1" },function(data){
$("#content").hide().append(data).slideDown();
});
return false;
});
});
Everytime I click on one of the buttons alert(url); shows undefined.
I can't find the mistake... can you help me please???
I have a 2nd Problem: also with the Code above: The link klicked on is removed an a new one with the same class is loaded via ajax, but the jquery event doesn't go off then the user clicks on the new link.
Thank you for your help in advance.