collapsable

Jquerymobile adding dynamic collapsible divs [duplicate]

给你一囗甜甜゛ 提交于 2020-01-03 19:04:25
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Dynamically adding collapsible elements I would like to know how I could dynamically add a collapsible div, such a thing can be done with Jqm listviews, calling lisview('refresh') after here is the testing code: http://jsfiddle.net/ca11111/UQWFJ/5/ edit: in above, it's appended and rendered, but multiple times edit2: seems working like this? 回答1: How about omitting the refresh since you are initializing the

Jquerymobile adding dynamic collapsible divs [duplicate]

穿精又带淫゛_ 提交于 2020-01-03 19:04:19
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Dynamically adding collapsible elements I would like to know how I could dynamically add a collapsible div, such a thing can be done with Jqm listviews, calling lisview('refresh') after here is the testing code: http://jsfiddle.net/ca11111/UQWFJ/5/ edit: in above, it's appended and rendered, but multiple times edit2: seems working like this? 回答1: How about omitting the refresh since you are initializing the

How to make pre-collapsed TreeView with php/javascript

混江龙づ霸主 提交于 2019-12-24 16:33:59
问题 I've made a tree view using php/javascript. I just can't figure out how to make it pre-collapsed, on page load. here is the code, come with the ideas. <?php $query=mysql_query("SELECT tree_entry_lang.entry_id, tree_entry_lang.lang, tree_entry_lang.name, tree_entry.parent_entry_id FROM tree_entry,tree_entry_lang WHERE tree_entry.entry_id=tree_entry_lang.entry_id AND lang='eng'"); $numrows=mysql_num_rows($query); if($numrows>0){ echo "<ul >"; while($row=mysql_fetch_assoc($query)){ echo "<li>

Collapsible list using JQuery

你说的曾经没有我的故事 提交于 2019-12-24 13:49:42
问题 <script> $(document).ready(function(){ var xml = "<root> \ <method name='A'> \ <childcall name='B'></childcall> \ <childcall name='C'></childcall> \ </method> \ <method name='B'> \ <childcall name='D'></childcall> \ </method> \ <method name='C'> \ <childcall name='D'></childcall> \ <childcall name='E'></childcall> \ </method> \ </root>"; var data = $.parseXML(xml); console.log(data); $(data).find('method').each(function(){ var name = $(this).attr('name'); $('<div class="items"></div>').html('

Dead simple Collapsable List Function for deep and shallow nested UL/LI lists (JQuery)

邮差的信 提交于 2019-12-17 17:00:54
问题 I waded through a TON of terrible js "solutions" for how to simply make collapsible nested list(s). This is what I eventually came up with. I'm posting here in the hopes the next guy won't have to deal with all the rufuse out there. Otherwise feel free to add your own! maybe jquery free method if you can manage it? list must be in "proper" format to work 回答1: css: ul>li>ul { display: none; } js/jquery $('li').click(function(e){ e.stopPropagation(); if(this.getElementsByTagName("ul")[0].style

Expand/Collapse Nested Repeater

*爱你&永不变心* 提交于 2019-12-13 04:12:53
问题 I am trying to implement a nested repeater with outer repeater showing categories (initially collapsed) and when user clicks + or - inner repeater expands/collapses. I have the repeaters but when I clicked on + both inner repeaters expanded. I tried to set the class name dynamically so only one would expand but now it sees I broke it. This is what I have and what I have tried (minus irrelevant stuff): <asp:Repeater runat="server" ID="rptCategoryList" OnItemDataBound="rptCategoryList

Collapsable print_r() tree with PHP 7 (w/o preg_replace() and /e)

眉间皱痕 提交于 2019-12-12 16:49:02
问题 In order to print_r a collapsable tree, I'm currently using his code which uses preg_replace() and the /e modifier, which is depreciated in PHP7: <?php function print_r_tree($data) { // capture the output of print_r $out = print_r($data, true); // replace something like '[element] => <newline> (' with <a href="javascript:toggleDisplay('...');">...</a><div id="..." style="display: none;"> $out = preg_replace('/([ \t]*)(\[[^\]]+\][ \t]*\=\>[ \t]*[a-z0-9 \t_]+)\n[ \t]*\(/iUe',"'\\1<a href=\

Export or Download d3.js sunburst / collapsible tree charts as pdf file

不问归期 提交于 2019-12-10 11:07:03
问题 I need to download my d3.js collapsible tree chart and sunburst chart as PDF file . I tried using jspdf.plugin.svgToPdf plugin but it doesnt work. Could someone guide me in downloading the charts as pdf ? My source code for collapsible tree (function () { var out$ = typeof exports != 'undefined' && exports || this; var margin = { top : 20, right : 120, bottom : 20, left : 120 }, width = 960 - margin.right - margin.left, height = 800 - margin.top - margin.bottom; var i = 0, duration = 750,

Collapse a DIV hiding its content even if defined in percentage

拈花ヽ惹草 提交于 2019-12-08 17:23:32
I'm trying to obtain a DIV that could collapse on click. For this simple example , click is triggered directly on the entire DIV. <div id='fixed'> <input type='text'> </div> #fixed { width: 200px; } #fixed input { width: 180px; } .short_fixed { width: 50px !important; } $('#fixed').click(function(){ $(this).toggleClass('short_fixed'); }); My example shows 2 cases: first one use "fixed" width object, while the second one use "percentage" width. When clicked, first DIV truncates without resizing its content, resulting in hiding overflow content, but it requires to have px based width that is not