accordion

accordion within accordion collapses parent accordion

我们两清 提交于 2019-12-12 05:28:38
问题 I'm using jqueryui's accordion control. I'm required to set up a navigation that involves accordions within accordions. It looks like it builds all the accordions okay. I expand the first one and see the second one. When I expand the second one, I see it expand, but then its parent accordion rolls up and hides the child accordion I just expanded. This codepen shows my problem: http://codepen.io/chodenode/pen/Evnsz Many thanks for any help: My HTML: <script src="http://code.jquery.com/jquery-1

Getting Div ID on Header Click, Accordion

五迷三道 提交于 2019-12-12 05:13:25
问题 I'm using Jquery accordion to populate a dynatree. I need my accordion div's to populate on click of the header, so that is why I am trying to grab div id. This Jquery works but only when I click inside the expanded div and not the header. Which makes sense because my event is .common click. $(".common").click(function () { var currentID = $(this).attr("id"); alert(currentID); }); <div id="accordion"> <h3>Project Type</h3> <div id="1" class="common" style="height:150px;"> </div> <h3

Binding For-Each to JQuery Accordion

こ雲淡風輕ζ 提交于 2019-12-12 05:11:46
问题 I want to create an accordion UI using a for each loop. I have the following code so far... HTML <div id="accordion" data-bind="foreach: fixtures"> <h3><a href="#" data-bind="text: name"></a></h3> <div>Information</div> </div> JAVASCRIPT $("#accordion").accordion({ header: "h3", collapsible: true, active: true}); Any clues as to where this is going wrong? 回答1: Put inside $(document).ready(function () {... $(document).ready(function () { ... $("#accordion").accordion({ header: "h3",

Active Accordeon Menu don't work with sublinks with query strings

一曲冷凌霜 提交于 2019-12-12 02:57:54
问题 @Ejay Help me to set "opened" the main link if i click iin some sublinks of this... here: Set "active" accordion menu after click i make some modifications like: <script type="text/javascript"> $(document).ready(function(){ var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf('/') + 1); var url = sPage.split('?')[0]; $('dd').filter(function () { return $('a[href="' + url + '"]', $(this)).length == 0 }).hide(); $('dt a.submenu').click(function () { $("dd:visible"

How To Detect a Button Click in the Expanded Accordion Row

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 02:56:39
问题 I have an accordion which gets populated based on a dropdown selection. In the 'details' section of each accordion row, I have a button which simply hides the entire accordion and shows a div (which is hidden by default). The div contains the same details as the row selected as well as some additional fields to allow a request be submitted for that item. The first accordion row works fine but when I click on any other row, nothing happens. I'm assuming this is because the buttons are named

How can I toggle text in the header of the jQuery accordion?

回眸只為那壹抹淺笑 提交于 2019-12-12 02:42:59
问题 I want text in the header of my jQuery accordion to toggle between "edit" and "close" -- I can get it working when toggling a single panel open and closed, however if I leave a panel open and click on a different panel, the previous panel closes but the text still says "close." I'm still learning jQuery and JavaScript. I've tried for hours, but can't seem to find a solution. Any suggestions would be hugely appreciated! This jQuery allows me to toggle the text successfully on one panel: $

Accordion panel in wordpress shortcode is not collapsing with custom post

百般思念 提交于 2019-12-12 02:37:19
问题 Accordion panel not collapsing with shortcode in custom post type. I can not add 'collapse class' in the accordion. It may be the issue in this case. jQuery(document).ready(function($){ $(".panel-group .panel:first-child .panel-heading").addClass("active"); $(".panel-group .panel:first-child .panel-collapse").addClass("in"); }); This is the function I have in functions.php of my theme: function acordian_shortcode( $atts ) { extract(shortcode_atts(array( 'count' => '3', 'id' => '1', ), $atts )

How to Detect a Button Click in an Expanded Accordion Row with Multiple Labels

混江龙づ霸主 提交于 2019-12-12 02:28:09
问题 This is an extension to another post by myself (How To Detect a Button Click in the Expanded Accordion Row). After adding some additional rows in the details section of my accordion control and moving the 'Select' button into a separate div, I am only getting the values from the first accordion row. This was my original issue. Just to confirm the original solution worked, if I move my 'Select' button into the save div containing the label for Location, it passes the correct location label (

Accordion on Sharepoint 2010 content query

ぐ巨炮叔叔 提交于 2019-12-12 01:24:07
问题 I am now trying to implement the accordion function for a content query webpart. Basically, the content query structure looks like this: Title Content I want to expand collapse <li class="dwft-item"> <div class="link-item"> Title </div> <div class="description"> Content I want to expand collapse </div> </li> <li class="dwft-item"> <div class="link-item"> Title </div> <div class="description"> Content I want to expand collapse </div> </li> <li class="dwft-item"> <div class="link-item"> Title <

jQuery Accordion Functionality panel opens when it shouldn't be opening

可紊 提交于 2019-12-12 01:23:49
问题 I grabbed a great collapsible accordion code from a site (inspirationalpixels). It's working great except the problem is whenever I click on the word "WEIRD PART", the panel opens again which it shouldn't be. When I click the word "Chapter 1", accordion works okay. There is a span class enclosed on the word maybe that's it? You'll see what I mean here HTML Code: <h2><a class="bb-sc-title" href="#chapter01">Chapter 1 <span>WEIRD PART</span></a> </h2> <div id="chapter01" class="bb-story-content