Browse Source

Changed $(document).ready to preferred Drupal.behavoirs.myBehavoirMethod = function (context), working around bug in Drupal 6.

mestato 13 years ago
parent
commit
9943588dce
1 changed files with 2 additions and 2 deletions
  1. 2 2
      theme_tripal/node-chado_feature.tpl.php

+ 2 - 2
theme_tripal/node-chado_feature.tpl.php

@@ -35,7 +35,7 @@ $feature  = $variables['node']->feature;
 
 <script type="text/javascript">
 if (Drupal.jsEnabled) {
-   $(document).ready(function() {
+   Drupal.behaviors.organismBehavior = function (context){
       // hide all tripal info boxes at the start
       $(".tripal-info-box").hide();
  
@@ -73,7 +73,7 @@ if (Drupal.jsEnabled) {
       }
 
       $("#tripal_organism_toc").height($("#tripal_feature-base-box").parent().height());
-   });
+   };
 }
 </script>