summaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2016-02-26 20:50:36 +0100
committerAndreas Gohr <andi@splitbrain.org>2016-02-26 20:50:36 +0100
commitb288bde8c9db9190a39be1beb6f0a6ddfde2ad14 (patch)
treecda0d79f6307803b61cb06b3f8995295552ef2a0 /script.js
parentcbc3610a1d15feae4b1fb006e2ea2fba2648f49b (diff)
downloadxdebug-trace-tree-b288bde8c9db9190a39be1beb6f0a6ddfde2ad14.zip
xdebug-trace-tree-b288bde8c9db9190a39be1beb6f0a6ddfde2ad14.tar.gz
xdebug-trace-tree-b288bde8c9db9190a39be1beb6f0a6ddfde2ad14.tar.bz2
allow collapsing all functions of the same name
Diffstat (limited to 'script.js')
-rw-r--r--script.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/script.js b/script.js
index c143477..f45ab90 100644
--- a/script.js
+++ b/script.js
@@ -1,7 +1,7 @@
$(function(){
- $('div.d').click(function (e) {
+ $('div.d, div.f').click(function (e) {
if (e.target !== this) return;
$(this).toggleClass('hide');
e.preventDefault();
@@ -18,4 +18,15 @@ $(function(){
$('#internal').change(function(){
$('div.i').toggle();
});
+
+ $('span.name').click(function(e){
+ if (e.target !== this) return;
+
+ var $fn = $(this);
+ var name = $(this).text();
+ $("span.name:contains('"+name+"')").closest('div.f').toggleClass('hide');
+
+ e.preventDefault();
+ e.stopPropagation();
+ });
}); \ No newline at end of file