accordion

jQuery Accordion - open specific section on pageload

删除回忆录丶 提交于 2019-11-30 04:56:30
I have a rather basic implementation of a jQuery Accordion on a page (using 1.3.2, jQuery UI Core 1.72 and jQuery UI Accordion 1.7.2), and I wish to open the 2nd section when the page loads. i've tried numerous methods but nothing seems to work... HEAD SCRIPT: <script type="text/javascript"> $(function() { $("#accordion").accordion({ event: "mouseover" }); }); BODY ACCORDION: <div id="accordion"> <h3><a href="#">Headline 001</a></h3> <div> <ul> <li><a href="#1">Link 001</a></li> <li><a href="#2">Link 002</a></li> </ul> </div> <h3><a href="#">Headline 002</a></h3> <div> <ul> <li><a href="#3"

Dynamically adding and refreshing elements to the Accordion widget in jQuery UI

不想你离开。 提交于 2019-11-30 03:41:40
Several questions here on SO reference this open jQuery UI feature request for the ability to dynamically add/remove panels from the Accordion widget. The ticket itself is marked (closed feature: fixed) and from what I can tell from the unit tests and a pull from their Git repository it appears to be implemented in the latest release. However if I try to add a div like they did in the unit test above: var element = $("#accordion"); $("#accordion").append("<h3>3</h3><div>3</div>"); $("#accordion").accordion("refresh"); I can't get it to work. However this method works: $("#accordion").append("

Hide jQuery Accordion while loading

自古美人都是妖i 提交于 2019-11-30 02:13:00
I am testing a site build with a slow connection and I noticed the jQuery Accordion stays expanded for a long time, until the rest of the site is loaded, and then finally collapses. Not very pretty. I was wondering how I could keep it collapsed through the loading process and only expand when clicked. I am working with the standalone 1.6 version of the accordion plugin. The basic structure : <div class="sidebar"> <ul id="navigation" class="ui-accordion-container"> <li><a class="head" href="#">1</a> <ul class="sub"> <li><a href="#">1a</a></li> <li><a href="#">2a</a></li> </ul> </li> </ul> </div

jQuery Accordion: IE animation issues

跟風遠走 提交于 2019-11-30 01:54:55
Update I am making this a community wiki, for three reasons: I don't feel like I got a definitive answer, but I have long since stopped needing an answer, because I rolled my own accordion function this question gets tons of views, so clearly lots of people are still interested So if anybody wants to change/clarify this question and make it a definitive guide, be my guest. I'm working on a page using jQuery's accordion UI element . I modeled my HTML on that example, except that inside the <li> elements, I have some unordered lists of links. Like this: $(document).ready(function() { $(".ui

Hiding the first tab of accordion panel in JSF Primefaces

时光怂恿深爱的人放手 提交于 2019-11-29 17:46:06
问题 By default the first tab of the primefaces accordion panel is shown open on page load. Is there a way that it can be closed on page load. Thanks 回答1: One approach is to define a widgetVar: <p:accordionPanel widgetVar="accordion"> ... </p:accordionPanel> And then: <body onload="PF('accordion').unselect(0)"> or for older PF versions: <body onload="accordion.unselect(0)"> 回答2: You can just do <p:accordionPanel activeIndex="-1"> 回答3: It works if you set activeIndex to blank (Primefaces 3.4.1). <p

All css accordion divs open by default (no jquery)

若如初见. 提交于 2019-11-29 17:15:10
I'm using this: jsfiddle.net/wromLbq5 And am hoping to have the ability to have multiple accordion sections open at once, and on page load. By this I mean, when one opens, I don't want the other to close. Is this possible? Without javascript as well. (Ignore all the sub accordions too- I only need one layer) HTML <ul class="accordion"> <li id="one" class="files"> <a href="#one">My Files<span>495</span></a> <ul class="sub-menu"> <li><a href="#one"><em>01</em>Dropbox<span>42</span></a></li> <li><a href="#one"><em>02</em>Skydrive<span>87</span></a></li> <li><a href="#one"><em>03</em>FTP Server

How can I make an “Accordion Widget” in WPF?

非 Y 不嫁゛ 提交于 2019-11-29 15:17:39
问题 The goal: I'm trying to achieve something like this in WPF: (source: wordpress.org) An initial solution: At the moment, I'm trying to use an ItemsControl with an ItemTemplate composed of an Expander . I want a consistent look for the Header portion of the Expander , but I want the Content portion of the Expander to be completely flexible. So, it's basically a set of "portlets" stacked vertically, where each portlet has a consistent title bar but different content. The code so far: This is

CSS Menu without javascript

邮差的信 提交于 2019-11-29 15:13:58
问题 Can anybody give a reference or is it possible to create a menu entirely depending on CSS and not a single bit of javascript ? The Requirement is a dropdown menu, which can have many children ( submenu ) . Will anything if created like this will be cross browser compatible ? Any help on this topic will be appreciated!. EDIT Thanks for all your inputs one more doubt Can this be implemented rather than using ul li say div span combination as that may help me achieving a menu which won't change

jquery-ui accordion: adding rows without destroying and recreating?

不打扰是莪最后的温柔 提交于 2019-11-29 11:40:00
I have a jquery accordion which I want to add rows to. I can accomplish this by calling .accordion("destroy"), adding the needed <h3></h3><div> ... bit and then calling .accordion() again, but this destroys the state and closes any dividers which are open. Is it possible to add rows to the accordion without destroy and recreating it? No it is not possible. jQuery should add an "add" method to accordion like they have for tabs: //save state var state = $("#accordion").accordion( "option", "active" ); //add accordion item, destroy then re-create $("#accordion").append("<h3></h3><div/>")

Only open one accordion tab at one time

戏子无情 提交于 2019-11-29 10:06:28
问题 I have an accordion that works really well, it looks good on the site and works as it should. However, I'm trying to add some more JavaScript functionality to it, to make it more it look more professional. Currently, the accordion allows you to have multiple panels open at one time i.e. if I open one tab, and then open another tab, both tabs will be open at the same time. And the only way to close these panels, is to re-click on the header. What I would like is some JavaScript code that