Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. <div id="chart">
  2. <div class="node">
  3. <div class="btn-group">
  4. <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
  5. Actions
  6. <span class="caret"></span>
  7. </a>
  8. <ul class="dropdown-menu" style="text-align:left;">
  9. <li><a href="#">Edit</a></li>
  10. <li><a href="#">Delete</a></li>
  11. </ul>
  12. </div>
  13. </div>
  14.  
  15. <div class="node">
  16. ...
  17. </div>
  18.  
  19. $("div#chart div.btn-group > a.dropdown-toggle").click(function (e) {
  20. e.stopPropagation();
  21. });
  22.  
  23. $("#orgchart").jOrgChart({ chartElement: '#chart' });
  24.  
  25. $("div#chart div.btn-group > a.dropdown-toggle, .dropdown-menu li a").click(function(e) {
  26. e.stopPropagation();
  27. $('.dropdown-menu').toggle();
  28. });​
  29.  
  30. $("div#chart div.btn-group > a.dropdown-toggle").click(function (e) {
  31.  
  32. e.isDropDownToggleEvent =true;
  33. })
  34.  
  35. $("div.node").click(function (e) {
  36. if (e.isDropDownToggleEvent != null && e.isDropDownToggleEvent)
  37. return false;
  38.  
  39. return true;
  40. })
  41.  
  42. $("div#chart .dropdown-menu li").bind('click',function (e) {
  43. e.stopPropagation();
  44. },false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement