Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/12/2009, 05:39
Pelirr
 
Fecha de Ingreso: diciembre-2008
Mensajes: 233
Antigüedad: 15 años, 5 meses
Puntos: 1
Respuesta: dejar seleccionada una opción de una lista ul

Mirando, mirando, resulta que al final todo va a tener que ver con el archivo SpryTabbedPanels.js, que contiene lo siguiente:

var Spry;
if (!Spry) Spry = {};
if (!Spry.Widget) Spry.Widget = {};

Spry.Widget.TabbedPanels = function(element, opts)
{
this.element = this.getElement(element);
this.defaultTab = 0; // Show the first panel by default.
this.bindings = [];
this.tabSelectedClass = "TabbedPanelsTabSelected";
this.tabHoverClass = "TabbedPanelsTabHover";
this.tabFocusedClass = "TabbedPanelsTabFocused";
this.panelVisibleClass = "TabbedPanelsContentVisible";
this.focusElement = null;
this.hasFocus = false;
this.currentTabIndex = 0;
this.enableKeyboardNavigation = true;

Spry.Widget.TabbedPanels.setOptions(this, opts);

// If the defaultTab is expressed as a number/index, convert
// it to an element.

if (typeof (this.defaultTab) == "number")
{
if (this.defaultTab < 0)
this.defaultTab = 0;
else
{
var count = this.getTabbedPanelCount();
if (this.defaultTab >= count)
this.defaultTab = (count > 1) ? (count - 1) : 0;
}

this.defaultTab = this.getTabs()[this.defaultTab];
}

// The defaultTab property is supposed to be the tab element for the tab content
// to show by default. The caller is allowed to pass in the element itself or the
// element's id, so we need to convert the current value to an element if necessary.

if (this.defaultTab)
this.defaultTab = this.getElement(this.defaultTab);

this.attachBehaviors();
};

entre otras cosas. De ahí que supongo que podría cambiar algo con una función javascript al hacer la llamada
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
cambiando algún elemento, porque lo que hace que se vea el contenido de una pestaña creo que es TabbedPanelsContentVisible. ¿Alquien se ha pegado ya con ésto?

Muchas gracias, un saludo