Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/03/2011, 19:29
Avatar de masterpuppet
masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 4 meses
Puntos: 845
Respuesta: Obtener id de un div con jquery 1.4.2

Si lo elementos son correlativos podrias hacerlo por medio de la clase css, algo asi:

Código Javascript:
Ver original
  1. $(document).ready(function(){
  2.     $('.jp-player').each(function(index) {
  3.         var i  = $(this).attr('id').replace('topten_', '');
  4.         var cancion = $("#rola_" + i).val();                           
  5.         $(this).jPlayer({
  6.             ready: function () {
  7.                 $(this).jPlayer("setMedia", {
  8.                     mp3: cancion
  9.                 }).jPlayer("stop");
  10.             },
  11.             swfPath: "js",
  12.             supplied: "mp3",
  13.             cssSelectorAncestor: "#jp_interface_" + i
  14.         }).bind($.jPlayer.event.play, function() {
  15.             $(this).jPlayer("pauseOthers");
  16.         });
  17.     });
  18. });

Saludos.
__________________
http://es.phptherightway.com/
thats us riders :)