Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/02/2013, 06:33
isaacsc
 
Fecha de Ingreso: febrero-2013
Ubicación: Madrid
Mensajes: 18
Antigüedad: 11 años, 3 meses
Puntos: 0
para que sirve event.event.preventDefault()

He visto este codigo, pero no se exactamente que hace la funcion event.event.preventDefault();

Alguien podria contestarme????

$(document).ready(function(){
// vemos que tira con el alert
alert("jQuery está funcionando");
// Cuando hacemos click en un elemento salta la función
$("#calendar").click(function(event){
//Para el click
event.event.preventDefault();
//Ejecuto el AJAX
$.ajax({
type: "POST",
url: 'http://localhost/curso_phonGap2.2/jqueryMobile/listar.php',
dataType: "html",
success: function(data) {$("#wrapper").html(data);},// datos recividos
error: function(error) {$("#wrapper").html(error);} // Error
});//ajax
});//click
});//docready