I have hyperlinks, all are named 'mylink'. They should all fire the same event, but only the first element named 'mylink' actually fires. My code is as follows:
$(document).ready(function() {
$("#formID").validationEngine()
$('#mylink').click(function(e){
var goto = $(this).attr('href'); //get the url
$.ajax({
url: goto
}); //execute the href
e.preventDefault(); //prevent click
$('#mylink').parent().parent().fadeOut("slow");
});
})
Where am I going wrong?