$(document).ready(function(){
$('#something ul a').click(function(e) {
...
...
e.preventDefault();
})
});
what is the e for and the e.preventDefault mean so i can understand what is happening here
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
eargument is theeventobject.It contains information about the click event.
For more information, see the documentation.
The
preventDefault()method prevents the borwser’s default action for the event.In this case, it will prevent the browser from navigating to the link.