Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/07/2012, 09:22
Avatar de rogertm
rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Sumar los anchos de los <li> dentro de un <ul>

Gracias hermano, ha funcionado, he tenido que meterle algo de coco por mi falta de conocimiento en el tema, pero ya está funcionando ok, ahora me falta hacer mucho testeo con contenidos diferentes a ver si no hay ninguna otra cosa por hacer. Por ahora el código ha quedado así:
Código Javascript:
Ver original
  1. $(function(){
  2.     var $tabs = $('#idx-tabs ul');
  3.    
  4.     /* Scrollable ribbon */
  5.     var w = 0;
  6.     var scroll = $("#idx-tabs .scroll");
  7.     var left_scroll = $("#idx-tabs .scroll.left");
  8.     var right_scroll = $("#idx-tabs .scroll.right");
  9.  
  10.     $("li", $tabs). each(function(){
  11.         margin = parseInt($(this).css("margin-right"));
  12.         margin += parseInt($(this).css("margin-left"));
  13.         margin += parseInt($(this).css("padding-right"));
  14.         margin += parseInt($(this).css("padding-left"));
  15.         w += $(this).outerWidth(true) + margin;
  16.         }
  17.     );
  18.    
  19.     var scrolling; // for intervals
  20.     var scroll_step = 25;
  21.     var scroll_speed = 100; // ms
  22.     $tabs.width(w);
  23. ...

Gracias por la ayuda...
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose