This is a migrated thread and some comments may be shown as answers.

Hide all the Accordion Tab on page loading up ?

3 Answers 159 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kenneth Ho
Top achievements
Rank 1
Kenneth Ho asked on 19 Oct 2009, 05:12 PM
By using the telerik MVC API, how can I hide all the Accordion Tab on page loading up ? By default, it will expand the first tab on page loading up! Thanks a lot!


3 Answers, 1 is accepted

Sort by
0
dejavu
Top achievements
Rank 2
answered on 23 Oct 2009, 01:15 AM
Some colleague override that behavior today at work, so all tab's contents hide on page load, but during that initial step it can be seen first panel content hiding before rendering ends.

I want to hide contents inside an accordion too, but in some better way, so nothing can be seen until page finish to load.

Cheers.
0
Georgi Krustev
Telerik team
answered on 23 Oct 2009, 09:00 AM
Hello,

The current implementation of Accordion component does not allow to render all items closed. You should javascript code to close it after it is rendered on the page. To avoid using JavaScript to close the item on the client, you can build your own jQueryUI assembly, implementing the required functionality.

Kind regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
dejavu
Top achievements
Rank 2
answered on 23 Oct 2009, 11:23 AM
Hi Georgi and thanks for your answer.

So, a quick and dirty workaround would be, for example, render something like a <div> on top of an accordion component. And after page rendering ends, make that <div> transparent or remove it completely from the DOM.

A second, better and much cleaner implementation (but obviously not so simple) would be create our own behavior on top of jQueryUI like you said. Considering that, ¿there are some examples implementing that solution anywhere?.

Thanks again!
Tags
General Discussions
Asked by
Kenneth Ho
Top achievements
Rank 1
Answers by
dejavu
Top achievements
Rank 2
Georgi Krustev
Telerik team
Share this question
or