Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Toggle Input Submit based on whether
- // there are ANY input fields showing
- function toggleInputSubmit() {
- var dis, showit = false;
- $$(".tag, .field a").each(function (el) {
- el.observe("click", function (event) {
- $$(".field").each(function (f) {
- dis = f.getStyle("display");
- if (dis !== "none") {
- showit = true;
- throw $break;
- } else {
- showit = false;
- }
- });
- if (showit) {
- $("search_submit").show();
- } else {
- $("search_submit").hide();
- }
- });
- });
- }
Add Comment
Please, Sign In to add comment