Hello, I’m new here.
I have difficulty programming javascript … wanted to run the script after loading the page.
I have a object with a defined class “activator” and if i click them, it works…
But… how i put page loading “overlay” automatcly?
Thanks
[CODE]<div class=”content”>
<!– The activator –>
<a class=”activator” id=”activator” style=”left: 0px; top: 0px; width: 11px; height: 9px”></a>
</div>
<div class=”footer”>
</div>
<!– The overlay and the box –>
<div class=”overlay” id=”overlay” style=”display:none;”></div>
<div class=”box” id=”box”>
<a class=”boxclose” id=”boxclose”></a>
<h1>Escolha uma das seguintes opções</h1>
<p>
You have a new message
</p>
</div>
<!– The JavaScript –>
<script type=”text/javascript” src=”jquery-1.3.2.js”></script>
<script type=”text/javascript”>
$(function () {
$(‘#activator’).click(function(){
$(‘#overlay’).fadeIn(‘fast’,function(){
$(‘#box’).animate({‘top’:’160px’},500);
});
});
$(‘#boxclose’).click(function(){
$(‘#box’).animate({‘top’:’-200px’},500,function(){
$(‘#overlay’).fadeOut(‘fast’);
});
});
});
</script>