Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Sliding div slides up automatically!
Old 10-18-2010, 06:09 AM Sliding div slides up automatically?!?
Snooper's Avatar
Novice Talker

Posts: 14
Name: Jo
Location: Zanzibar - Ston Town
Trades: 0
Hello people,

I have a problem with this sliding div on the bottom of my page. It is 100% width and 500px height div, supported by external jQuery.js (version 1.4.2). The problem is that it slides up automatically when page loads in browser (both IE6 and FF) and it slides down immediately. After that it slides up and down normally when it's button is clicked (toggle function).

I'd like to stop that automatically sliding up and down, and to have that div closed on the bottom of my page till user click the button to open it up.

Here is the code of the page:

***

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head profile="http://gmpg.org/xfn/11">

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>sliding div from bottom</title>
<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript">
$(function() {
$('#footerSlideButton').click(function () {
$('#footerSlideContent').slideToggle();
});
$('#footerSlideButton').trigger('click');
});
</script>

<style type="text/css">
body {
margin:0;
padding:0;
}
#footerSlideContainer {
position: absolute;
bottom:0;
width: 100%;
}
#footerSlideButton {
margin: 0 auto 0 60px;
width:120px;
text-align:center;
cursor: pointer;
}
#footerSlideContent {
width: 100%;
height: 500px;
background: black;
color: white;
display:none;
}
</style>

</head>
<body>
<div id="footerSlideContainer">
<div id="footerSlideButton">Click Here!</div>
<div style="display:block" id="footerSlideContent">
Content of the slidin div goes here!!!
</div>
</div>
</body>
</html>

***
Can somebody help with this, please. Thanks in advance.

S
__________________
Stay Cool Guys...

Last edited by Snooper; 10-18-2010 at 06:14 AM.. Reason: spelling correction...
Snooper is offline
Reply With Quote
View Public Profile Visit Snooper's homepage!
 
 
Register now for full access!
Reply     « Reply to Sliding div slides up automatically!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33428 seconds with 12 queries