Files
typecho/admin/form-js.php
2013-11-24 23:35:44 +08:00

27 lines
690 B
PHP

<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<script>
(function () {
$(document).ready(function () {
var error = $('.typecho-option .error:first');
if (error.length > 0) {
$('html,body').scrollTop(error.offset().top);
}
$('form').submit(function () {
if (this.submitted) {
return false;
} else {
this.submitted = true;
}
});
$('label input[type=text]').click(function (e) {
var check = $('#' + $(this).parents('label').attr('for'));
check.prop('checked', true);
return false;
});
});
})();
</script>