I have two trees on the same page. The first is http://bl.ocks.org/1249394, and the other is http://bl.ocks.org/2503502. I followed the examples on these 2 links for my trees, with some alterations of course. I have included both on the same page. However the click functions seem to be conflicting. The tree at http://bl.ocks.org/1249394 works great, but the tree at http://bl.ocks.org/2503502 generates the tree with the correct data, but then when I click the root node to collapse, the child nodes data changes to that of the child nodes data for the first tree at http://bl.ocks.org/1249394. How do I fix this conflict?
Tree Diagrams click functions conflicting
251 Views Asked by user1704514 At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in CLICK
- Is there any way to bind a click event to a div's left border in jquery?
- CasperJS click on buttons is not working
- Click Event Not Working After Class Change
- Make <a> inside jQuery autocomplete clickable
- How to get a button's ID when clicked in Windows 8 apps?
- Selenium stops running after click() function runs
- How to fill a progress bar by clicking in VB.NET?
- jQuery button to show/hide multiple divs with same id
- Detect mouse clicks on circles on HTML5 canvas
- Teamcity: Simulating click on Procceed jQuery Button to create .BuildServer in bash
- Click event not working only when used in external JS file
- Capture all click events and discard unallowed
- Exclude elements from click event handler (jquery)
- in C#, changing background image of a button after click
- Combobox ItemTemplate dont accept click
Related Questions in D3.JS
- Change size of bubble in Scatter Plot for c3.js
- D3 Mouseenter vs Mouseover
- Svg containers not positioning properly
- Bar chart columns not grouping in D3/C3
- Drill down capabality in C3.js
- Changing data sources with zoomable d3 treemap
- Repeat an object with different input data
- d3.js Line Chart Custom x-axis
- D3 Pie Chart with only one part of JSON data
- Prevent click action when dragging a D3 Node
- selecting and using textPath elements in Chrome
- D3.js collapsable tree - visualise set number of levels
- access the array->object -> array values
- How to set a domain on an axis and have the axis intervals not constant or take up different amount of interval spaces using d3
- Detect which type of d3 scale I am working with
Related Questions in TREE-STRUCTURE
- How to go about not getting certain data from a JOIN
- Django CMS Multi-Level Dropdown Menu
- N-level tree structure in android implementation
- Tree Structure with recursive variadic template
- How to execute jquery call on data returned with jquery $.post call
- I need to show data in a drop down like a tree structure, I tried but could not get it right in ASP.Net
- Creating a tree datastructure - different approach
- Best practice for storing tree data in a database
- flatten tree structure into array
- What is the best option to read a tree structure in Python?
- String-path to Tree (JavaScript)
- How to insert elements to n array tree structure recursively if we know connection between parent and children?
- Tree Diagrams click functions conflicting
- TreeStore DragNrop activity not reflected in TreeStore
- How can I filter data without loading it first?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Have you tried just naming the click handlers differently? This looks like you've got identically-named functions that might be in the same scope, so you should either
make sure each graph is in a different scope (e.g. enclose all the code for each in different functions), or
make sure all the functions on the page have unique names, or
both.