tools.js 582 B

1234567891011121314151617181920212223242526
  1. function toggle_password_visibility() {
  2. if ($('#password').attr('type') === 'password')
  3. $('#password').attr('type', 'text');
  4. else
  5. $('#password').attr('type', 'password');
  6. }
  7. function delayed(callback) {
  8. callback();
  9. setTimeout(callback, 3000);
  10. }
  11. function show_hide() {
  12. for (var i = 0; i < arguments.length; i++) {
  13. var element = arguments[i];
  14. delayed(function () {
  15. $(element).toggle();
  16. });
  17. }
  18. }
  19. function scrolled_down(offset) {
  20. return $(window).scrollTop() >= $(document).height() - $(window).height() - offset;
  21. }