Hola a todos.
Les pido ayuda porque estoy comenzando un proyecto y la verdad es que conozco no js.
Estoy utilizando "Spry", que viene junto a dreamweaver, y la verdad es que logrando modificar el css lo pude diseñar a mi manera, pero aún no puedo cambiar el funcionamiento de esta.
Este es el ejemplo:
(agreguen antes el h t t p )
labs.adobe.com/technologies/spry/samples/effects/multiple_slides_sample.html
Como ven, al hacer click en los botones, aparecen los slides con la información.
Lo que necesito hacer yo, es al ingresas a la página, que aparezca de inmediato el "Slide 1" abierto y no esperar al click para que aparezca
el código js:
Código:
<script type="text/javascript">
var observer = {};
observer.nextEffect = false;
observer.onPostEffect = function(e){
if (this.nextEffect)
{
var eff = this.nextEffect;
setTimeout(function(){eff.start();}, 10);
}
this.nextEffect = false;
}
function myPanelsSlides(currentPanel)
{
// The list of all the panels that need sliding
var panels = ['slide1', 'slide2', 'slide3', 'slide4'];
var opened = -1;
// Let's check if we have an effect for each of these sliding panels
if (typeof effects == 'undefined')
effects = {};
for (var i=0; i < panels.length; i++)
{
if (typeof effects[panels[i]] == 'undefined'){
effects[panels[i]] = new Spry.Effect.Slide(panels[i], {from: '0%', to: '100%', toggle: true});
effects[panels[i]].addObserver(observer);
}
if (effects[panels[i]].direction == Spry.forwards && currentPanel != panels[i])
opened = i;
//prevent too fast clicks on the buttons
if (effects[panels[i]].direction == Spry.backwards && effects[panels[i]].isRunning)
{
observer.nextEffect = effects[currentPanel];
return;
}
}
if (opened != -1)
{
observer.nextEffect = effects[currentPanel];
effects[panels[opened]].start();
}
else if (effects[currentPanel].direction != Spry.forwards)
{
effects[currentPanel].start();
}
};
</script>
el código css:
Código:
<style type="text/css">
.demoDiv{
height: 150px;
overflow: hidden;
}
.hiddenElement{
display:none;
/* Fix IE floating bug */
position: absolute;
top: 140px;
}
</style>
Ayuda porfavor! miren que he estado 1 semana tratando de modificar el código y nada :S a lo más hago que los slides no se abran
de antemano, muchas gracias
saludos!