Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/07/2012, 09:50
khonzu
 
Fecha de Ingreso: abril-2012
Mensajes: 8
Antigüedad: 12 años
Puntos: 0
Exclamación cambio de atributo de html5 con funcion .attr

Tengo el siguiente código html5:

<video id="v1" controls src="/Styles/Videos/1.mp4" type="video/mp4" runat="server" width="640" height="480"></video>

Necesito cambiar la ruta del valor src, por ejemplo que quede src="/Styles/Videos/25.mp4", dicen que con jquery con la función .attr, se puede hacer este cambio. Poco se de jquery y lo he implementado de la siguiente manera,

En el head tengo:

<script type="text/javascript" src="/Scripts/jquery-1.4.2.js"></script>
<script type="text/javascript">
$(document).ready(function () {
('#v1').attr('src', '/Styles/Videos/25.mp4');
});
</script>

Pero la verdad no funciona, no cambia lo que necesito.

Cualquier ayuda estaré muy agredecido...