Title / Description
Code document.observe("dom:loaded", function() { $(document.body).observe("click", function(event) { var element = event.findElement("a[data-toggle]"); if(element) { var action = element.readAttribute("data-toggle"); element.hide(); element.next().show(); event.stop(); } else { var element = event.element(); if(!element.readAttribute("data-tab")) element = element.up("a[data-tab]") if(element) { selectTab(element.readAttribute("data-tab")); } } }); });
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code