form-js.php 714 B

1234567891011121314151617181920212223242526
  1. <?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
  2. <script>
  3. (function () {
  4. $(document).ready(function () {
  5. var error = $('.typecho-option .error:first');
  6. if (error.length > 0) {
  7. $('html,body').scrollTop(error.parents('.typecho-option').offset().top);
  8. }
  9. $('form').submit(function () {
  10. if (this.submitted) {
  11. return false;
  12. } else {
  13. this.submitted = true;
  14. }
  15. });
  16. $('label input[type=text]').click(function (e) {
  17. var check = $('#' + $(this).parents('label').attr('for'));
  18. check.prop('checked', true);
  19. return false;
  20. });
  21. });
  22. })();
  23. </script>