Guest User

Untitled

a guest
May 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. // Toggle Input Submit based on whether
  2. // there are ANY input fields showing
  3.  
  4. function toggleInputSubmit() {
  5. var dis, showit = false;
  6. $$(".tag, .field a").each(function (el) {
  7. el.observe("click", function (event) {
  8. $$(".field").each(function (f) {
  9. dis = f.getStyle("display");
  10. if (dis !== "none") {
  11. showit = true;
  12. throw $break;
  13. } else {
  14. showit = false;
  15. }
  16. });
  17. if (showit) {
  18. $("search_submit").show();
  19. } else {
  20. $("search_submit").hide();
  21. }
  22. });
  23. });
  24. }
Add Comment
Please, Sign In to add comment