Hi, im looking for someting like the Accordion Content script, but I want the content to load AFTER you clic. Thanks!!
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.
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
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.
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.
Ok, I'll be waiting then. Thanks!!!
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
Maybe this is what you're looking for.
It also has a horizontal accordion in it.
http://www.stickmanlabs.com/accordion/
Dave
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???
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.
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