Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/04/2015, 11:34
neoanderson
 
Fecha de Ingreso: febrero-2014
Ubicación: Rosario
Mensajes: 59
Antigüedad: 10 años, 3 meses
Puntos: 2
Jquery no ejecuta,pero javascript sí.

Hola a todos.
Les comento que estoy haciendo una práctica web con jquery pero resulta que jquery ,bién puesto en el archivo html,no funciona.En cambio javascript ,sí.
Abajo les voy a mostrar mi fragmento de código para que vean por ustedes mismos y me digan en qué (pavada,estupidez) estoy fallando.
Llevo 4 días tratando de entender por qué no se ejecuta jquery.
Revisé la consola de javascript, y no me marca ningùn error.Tampoco lo hace firebug.(Estoy usando el navegador firefox).
Me fijo en firebug si el archivo externo jquery-2.1.3.min.js se está cargando ,y sí.Se está cargando.
El archivo jquery está en la misma carpeta que los demás archivos.

Acá les dejo el código para que me ayuden con semejante estupidez para continuar mis estudios de diseño web.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>P&aacute;gina de prueba</title>
<style type="text/css">
body {
background-color: #fff;
color: #000;
font-family: Helvetica, Arial, sans-serif;
}
h1, h2, h3 {
margin-bottom: .2em;
}
.poem {
margin: 0 2em;
}
.highlight {
background-color: #ccc;
border: 1px solid #888;
font-style: italic;
margin: 0.5em 0;
padding: 0.5em;
}
</style>
</head>
<body>
<h1>Through the Looking-Glass</h1>
<div class="author">by Lewis Carroll</div>
<div class="chapter" id="chapter-1">
<h2 class="chapter-title">1. Looking-Glass House</h2>
<p>There was a book lying near Alice on the table,
and while she sat watching the White King (for she
was still a little anxious about him, and had the
ink all ready to throw over him, in case he fainted
again), she turned over the leaves, to find some
part that she could read, <span class="spoken">
"&mdash;for it's all in some language I don't know,"
</span> she said to herself.</p>
<p>It was like this.</p>
</div>
<div class="poem">
<h3 class="poem-title">YKCOWREBBAJ</h3>
<div class="poem-stanza">
<div>sevot yhtils eht dna ,gillirb sawT'</div>
<div>;ebaw eht ni elbmig dna eryg diD</div>
<div>,sevogorob eht erew ysmim llA</div>
<div>.ebargtuo shtar emom eht dnA</div>
</div>
</div>
<p>She puzzled over this for some time, but at last
a bright thought struck her. <span class="spoken">
"Why, it's a Looking-glass book, of course! And if
I hold it up to a glass, the words will all go the
right way again."</span></p>
<p>This was the poem that Alice read.</p>
<div class="poem">
<h3 class="poem-title">JABBERWOCKY</h3>
<div class="poem-stanza">
<div>'Twas brillig, and the slithy tov
<div>Did gyre and gimble in the wabe;</div>
<div>All mimsy were the borogoves,</div>
<div>And the mome raths outgrabe.</div>
</div>
</div>
</div>
<script type="text/javascript" src="jquery-2.1.3.js">
$(document).ready(function highLight(){
$(".poem-stanza").addClass("highlight");
});
</script>
</body>
</html>