JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Trying to make my own slide function. Element questions. Posted by ColacX on 17 Jul 2008 at 6:08 PM
Hi there I wanted to make my own slide function and ran into some trouble.
I've got some ideas of how to make it simpler but not perfect.
The statements marked in diffrent colors below is where the problem is, I just don't know how to write them.

function slideup(divid1) {
    var element1 = document.getElementById(divid1);
    var buffer1 = element1;
    
    element1 = ""; //The thought here is to turn element1 into a blank div without such things as "onClick="execute();"
    element1.innerHTML = "<div id='slide1'></div>";  //The thought is to add the original element into the new blank div
    var slide1 = document.getElementById("slide1");
    slide1 = buffer1; //Thoght here is to turn this element into an exact copy of the old one including things such as "onClick="execute();"
//Also tried element1.add(buffer1);

    element1.style.overflow = "hidden";
    element1.style.height ="100px";
    element1.style.width ="100px";
    slide1.style.width = "100px";
    slide1.style.height = "100px";
    slide1.style.marginTop = "-5px";
}


I can't find what document.xxxxxx.xxx.xxx has for other extensions. Is there full refrence page somewhere, I was thinking something like.
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JApplet.html

Tried looking here but I can't find anything useful.
http://developer.mozilla.org/en/docs/JavaScript
Report
Re: Trying to make my own slide function. Element questions. Posted by ColacX on 21 Jul 2008 at 1:52 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.