My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Evitar ejecución del evento click</title>
<script type="text/javascript" src="http://lineadecodigo.com/js/jquery/jquery.js"></script>
<script type="text/javascript">

$(document).ready(function(){
$("a").click(function(event) {
event.preventDefault();
$("#accion").append('Has pulsado el enlace ' + event.currentTarget + "<br/>");
});
});

</script>
</head>
<body>
<h1>Evitar ejecución del evento click</h1>

<h2>Enlaces</h2>
Pulsa sobre los enlaces:<br/>
<a href="http://www.google.com" title="Google">Google</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Código">Linea de Código</a><br/>
<a href="http://www.manualweb.net" title="Manual Web">Manual Web</a><br/>
<a href="http://www.w3api.com" title="W3Api">W3Api.com</a>

<h2>Enlace pulsado</h2>
<div id="accion"></div>




<br><br>
<hr>
Art&iacute;culo disponible en: <a href="http://lineadecodigo.com/jquery/evitar-que-se-ejecute-un-evento-con-jquery/">http://lineadecodigo.com/jquery/evitar-que-se-ejecute-un-evento-con-jquery/</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Codigo">lineadecodigo.com</a>


</body>
</html>

Change log

r259 by vcuervo on Jun 9, 2010   Diff
Evitar la ejecución de un click
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1358 bytes, 41 lines
Powered by Google Project Hosting