Commit 3fe513fe by doszhang

dos

parent 5359b6e6
...@@ -277,8 +277,16 @@ $(document).ready(function () { ...@@ -277,8 +277,16 @@ $(document).ready(function () {
$('.personal-page .btn-next').on('click', showSuggestPage); $('.personal-page .btn-next').on('click', showSuggestPage);
//署名输入框限制长度事件 //署名输入框限制长度事件
$('.suggest-page input[name=signature]').on('input propertychange', inputLength); $('.suggest-page input[name=signature]').on('input propertychange', inputLength);
//署名输入框聚焦判断有没有勾选同意
$('.suggest-page input[name=signature]').on('focus', checkAgree);
}); });
function checkAgree() {
if (!agreeSuggestion) {
$('.agree-wrap').addClass('animate');
}
}
function inputLength() { function inputLength() {
checkIt('signature', 12); checkIt('signature', 12);
} }
...@@ -603,6 +611,7 @@ function swapArray(arr, index1, index2) { ...@@ -603,6 +611,7 @@ function swapArray(arr, index1, index2) {
} }
function checkIt(bind, maxNum) { function checkIt(bind, maxNum) {
if (agreeSuggestion) {
var v = document.getElementById(bind).value; var v = document.getElementById(bind).value;
if (v == "") { if (v == "") {
...@@ -627,5 +636,7 @@ function checkIt(bind, maxNum) { ...@@ -627,5 +636,7 @@ function checkIt(bind, maxNum) {
} }
} }
} }
} else {
$("#" + bind).val(v.substr(0, 0));
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment