PDA

View Full Version : Sliding DIV with Dreamweaver help



blundersen
Mar 30th, 2007, 12:20 AM
I am having a hard time trying to get this Sliding DIV to work with my setup in Dreamweaver. I'm not sure of the placement of all the values for the Javascript and where the script should be placed and properly referenced. I don't even know where to put in the text that's contained in the sliding DIV! If anyone could give me some sort of walkthrough on how to put this to use, it would be much appreciated

Here is the Sliding DIV tutorial I'm having trouble with:
http://www.harrymaugans.com/2007/03/24/one-click-toggle-for-sliding-animated-div/

Which is based off this Javascript found here:
http://www.harrymaugans.com/wp-content/uploads/2007/03/motionpack.js

For instance: It tells me to add this code into the bottom of the motionpack found above;

function toggleSlide(objname){
if(document.getElementById(objname).style.display == "none"){
// div is hidden, so let's slide down
slidedown(objname);
}else{
// div is not hidden, so slide up
slideup(objname);
}
}

And then it says my link should look like this:

<a href="javascript:;" onmousedown="toggleSlide('mydiv');">Toggle DIV Slide</a>

I'm just having a hard time figuring out where to place the link described above in reference to the motionpack javascript. Any help would be much appreciated.

blundersen
Mar 30th, 2007, 05:31 PM
I just updated the information to detail exactly where I'm having trouble with things. Any help would be appreciated.

riptide
Mar 30th, 2007, 07:22 PM
where are your other two functions?
slidedown(objname)
and
slideup(objname)