forked from typecho/typecho
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform-js.php
More file actions
26 lines (23 loc) · 714 Bytes
/
Copy pathform-js.php
File metadata and controls
26 lines (23 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<script>
(function () {
$(document).ready(function () {
var error = $('.typecho-option .error:first');
if (error.length > 0) {
$('html,body').scrollTop(error.parents('.typecho-option').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>