Tutorial Jquery – Primer Ejercicio


<html>
<head>
<!--se inserta el archivo jquery (bajar de jquery.com-->
<script type="text/javascript" src="jquery.js"></script>
<!--Comienza el bloque javascript-->
<script type="text/javascript">
// La sintaxis basica para seleccionar y realizar una accion con jquery
// esta dada por $(selector).action()
// se debe entender al elemento "SELECTOR" se le apicara ACTION
$(document).ready(function(){
// Cuando se encuentre un elemento del tipo "p" al realizar la accion clic
$("p").click(function(){
// Esconde el elemento seleccionado
$(this).hide();
});
});

</script>
</head>

<body>
<p>If you click on me, I will disappear.</p>
</body>

</html>

Deja un comentario

Fill in your details below or click an icon to log in:

Logo de WordPress.com

You are commenting using your WordPress.com account. Log Out / Cambiar )

Twitter picture

You are commenting using your Twitter account. Log Out / Cambiar )

Facebook photo

You are commenting using your Facebook account. Log Out / Cambiar )

Connecting to %s

Seguir

Get every new post delivered to your Inbox.