i tried to put js code on the same page in sign_in.html like this :
{literal}
<script language="javascript" type="text/javascript">
var carrousel = {
nbSlide : 0,
nbCurrent : 1,
elemCurrent : null,
elem : null,
init : function (elem){
this.nbSlide = elem.find('.slidecar').length;
}
}
$(function(){
carrousel.init($('.carrousel'));
alert(carrousel.nbSlide);
});
</script>{/literal}
the alert box show 0... whereas i have 3 class in HTML code:
<div class="conteneur-slide">
<div class="carrousel">
<div class="slide-1" class="slidecar">
<div class="visu">
<div class="slider_1"></div>
<div class="titre"></div>
</div>
</div>
<div class="slide-2" class="slidecar">
<div class="visu">
<div class="slider_2"></div>
<div class="titre"></div>
</div>
</div>
<div class="slide-3" class="slidecar">
<div class="visu">
<div class="slider_3"></div>
<div class="titre"></div>
</div>
</div>
<div class="navigation-slide">
<span>o</span>
<span>o</span>
<span>o</span>
</div>
</div>
</div>
i also tried to do that:
with this:
<head>
<title>{$title}</title>
{$headData}
<script src="../carrousel.js"></script>
</head>
<!--[if IE 8]><body class="ow ie8{$bodyClass}"><![endif]-->
<!--[if !IE 8]><!--><body class="ow{$bodyClass}"><!--<![endif]-->
{$pageBody}
</body>
</html>
but it doesn't work (the alert box doesn't work)
so, how can i do ?
thanks a lot in advance