tripal-blast-ui.js 805 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @file
  3. * Initialize Tripal Blast UI page accordion element.
  4. */
  5. // Attach behavior.
  6. (function($, Drupal){
  7. Drupal.behaviors.TripalBlastUI = {
  8. attach: function (context, settings) {
  9. $('#tripal-blast-accordion').accordion({
  10. icons: false,
  11. collapsible: true
  12. });
  13. // Listen to what is BLAST information link.
  14. var infoLink = 'tripal-blast-nav-blast';
  15. var win = $('#tripal-blast-information-window');
  16. $('#' + infoLink)
  17. .once('#' + infoLink)
  18. .each(function() {
  19. $(this).click(function(e) {
  20. e.preventDefault();
  21. if (win.is(':visible')) {
  22. win.slideUp();
  23. }
  24. else {
  25. win.slideDown();
  26. }
  27. });
  28. });
  29. }}})(jQuery, Drupal);