Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    7
    Member #
    16214
    Hi
    I have a little problem that maybe someone can help me with.
    I am designing my portfolio site in Textpattern.
    I figured out what I want,
    I would like to use something like this http://www.gcmingati.net/wordpress/w...de-plugin.html
    in combination with something like this
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm
    to display my images.
    But I would like all the gallery in the same file, without loading external files, that would be easier on me to edit from inside textpattern.
    Is it posible to have DIVs that wont load at all at first but then make them load on clic?

  2.  

  3. #2
    Senior Member imagn's Avatar
    Join Date
    Jul 2007
    Location
    Los Angeles
    Posts
    156
    Member #
    15594
    Yes, you can use Javascript to create and remove DIVs.

    For example:

    function createDiv() {
    var newdiv = document.createElement('div');

    newdiv.setAttribute('id', 'someId');
    newdiv.style.position = 'absolute';
    newdiv.style.top = '0';
    newdiv.style.left = '0';
    newdiv.style.height = '200px';
    newdiv.style.width = '100%';
    newdiv.innerHTML = "Hi there!";
    newdiv.className = "someClass";

    document.body.appendChild(newdiv);
    }

    function removeDiv() {
    var removeit = document.getElementById('someId');
    document.body.removeChild(removeit);
    }

  4. #3
    Junior Member
    Join Date
    Dec 2007
    Posts
    7
    Member #
    16214
    Well, I guess I will have to study javascript to understnad all that.
    Maybe I should just do it with plain jpg´s.
    Thanks anyway!

    Quote Originally Posted by imagn
    Yes, you can use Javascript to create and remove DIVs.

    For example:

    function createDiv() {
    var newdiv = document.createElement('div');

    newdiv.setAttribute('id', 'someId');
    newdiv.style.position = 'absolute';
    newdiv.style.top = '0';
    newdiv.style.left = '0';
    newdiv.style.height = '200px';
    newdiv.style.width = '100%';
    newdiv.innerHTML = "Hi there!";
    newdiv.className = "someClass";

    document.body.appendChild(newdiv);
    }

    function removeDiv() {
    var removeit = document.getElementById('someId');
    document.body.removeChild(removeit);
    }


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:35 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com