Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Accordion Content script modification

  1. #1
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion Content script modification

    Hi, im looking for someting like the Accordion Content script, but I want the content to load AFTER you clic. Thanks!!
    Last edited by GuitarWorker; 01-31-2008 at 10:11 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Why not just set all the headers to be collapsed when the page loads? The setting you want to change is:

    Code:
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content

  3. #3
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, I put a wrong link in the firs post, it is fixed now.

    ddadmin, the thing is, that i have about 20 headers with a lot of pictures and text, and to load that is very heavy. Thats why I want the information of the header loads after you expand it.
    Last edited by GuitarWorker; 01-31-2008 at 08:19 PM.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ah, so you want the hidden contents to actually be empty until its header is clicked on. There's no easy way to do this right now unfortunately. What it would involve is the use of Ajax to dynamically fetch the contents. It's possible such a feature may be added to the script, but there's no ETA on that yet.

  5. #5
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, I'll be waiting then. Thanks!!!

  6. #6
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi, I'm also interested on that.

    I need the Accordion to load the html content after I click it,
    because I have 10 headers, full of images, videos and scripts (widgets)...

    please help.

    I found this; http://dojotoolkit.org/book/dojo-boo...dion-container

    If I'm not wrong,
    what they purpose is to "load externally"...
    meaning that you create a html with the content and you call it within the tab when is loaded...

    thanks

  7. #7
    Join Date
    Oct 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Maybe this is what you're looking for.
    It also has a horizontal accordion in it.

    http://www.stickmanlabs.com/accordion/

    Dave

  8. #8
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    You can do this quite easily with JQuery Ajax. Jquery is the javascript library used by this awesome script...

    Basically do an Ajax get request, wire it up so you are passing what has been clicked to your webservice or however you have set it up to work, then

    $.append() the returned html into the target div, the div is the child element of the header that the user clicked. You can also put a loading.gif ajax looking animation in the header so the user knows the content is loading and then remove it when the $.ajax hits it's success() function..

    I have something similar working with ASP.Net, I have adapted the script to dynamically create the accordion depending on the dataset returned.

    I added paging to the accordion so that if there are 15+ headers it will add paging. Clicking on a page number hides the accordion, removes the HTML, uses Ajax to return the new Accordion HTML and then shows this all with Jquery.

    The problem is that all the events associated with the accordion aren't re-initialised and calling ddaccordion.init() doesn't seem to do the trick...

    Anyone got any ideas???

  9. #9
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello, i am too really interested on this, i have several headers with a bunch of images and it takes a while to fully load the whole website.

    Is there already any solution for this?
    Thanks.

  10. #10
    Join Date
    May 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Interestingly, in Opera 10.53 the content does load asynchronously.
    Example implementation:
    http://e-ducation.net/outline.html
    The question remains, how to fully ajax-enable the script.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •