This commit is contained in:
2018-05-18 11:04:52 +08:00
parent 4fd63752e3
commit ac54918c75
+1 -4
View File
@@ -565,15 +565,13 @@ function collect(){
} }
/* 发布评论 */ /* 发布评论 */
$(".commentInputBox input").focus(function () { $(".commentInputBox input").click(function () {
alert("dddddd");
$(".commentInputBox").hide(); $(".commentInputBox").hide();
$(".commentReleaseBox").show(); $(".commentReleaseBox").show();
$(".commentReleaseBox input").focus(); $(".commentReleaseBox input").focus();
$(".commentReleaseBox input").val(""); $(".commentReleaseBox input").val("");
}); });
$(".commentReleaseBox a").on("click", function () { $(".commentReleaseBox a").on("click", function () {
alert("ccccc");
$(".commentReleaseBox").hide(); $(".commentReleaseBox").hide();
$(".commentInputBox").show(); $(".commentInputBox").show();
var content = $(".commentReleaseBox input").val(); var content = $(".commentReleaseBox input").val();
@@ -632,7 +630,6 @@ $(function() {
$('#commentInput').on('click', function () { $('#commentInput').on('click', function () {
var target = this; var target = this;
// 使用定时器是为了让输入框上滑时更加自然 // 使用定时器是为了让输入框上滑时更加自然
setTimeout(function(){ setTimeout(function(){
document.body.scrollTop = document.body.scrollHeight; document.body.scrollTop = document.body.scrollHeight;
target.scrollIntoView(true); target.scrollIntoView(true);