Browse Source

留言回复框自增高度

luyanan 7 years ago
parent
commit
e703f1a7f7
3 changed files with 6 additions and 6 deletions
  1. 3 3
      js/answerLeaveW.js
  2. 2 2
      js/informLeaveW.js
  3. 1 1
      js/leaveWord.js

+ 3 - 3
js/answerLeaveW.js

@ -181,7 +181,7 @@
181 181
	LeaveWord.prototype.autoGrow=function(){
182 182
		document.getElementById("tt").style.width=this.scrollWidth+"px";
183 183
		document.getElementById("tt").value=this.value;
184
		this.style.height=document.getElementById("tt").scrollHeight+"px";
184
		this.style.height=this.scrollHeight+"px";
185 185
	}
186 186
	LeaveWord.prototype.bindEvent = function() {
187 187
		var self = this;
@ -207,7 +207,8 @@
207 207
					break;
208 208
				case "hReply btnModel":self.replyLword(target,obj)
209 209
					break;
210
				case "qCancel": $(target).parent().siblings("textarea").val("").parents(".replyLeword").addClass("displayNone").siblings(".operateSpan").removeClass("displayNone")
210
				case "qCancel": $(target).parent().siblings("textarea").val("").parents(".replyLeword").addClass("displayNone").siblings(".operateSpan").removeClass("displayNone");
211
								$(target).parent().siblings("textarea").css("height",'38px');
211 212
					break;
212 213
			}
213 214
		});
@ -278,7 +279,6 @@
278 279
		}, "GET", function(data) {
279 280
			self.LwordTotal($($this).parents(".commentList"),{sid:lid.refId,stype:lid.refType});
280 281
			$($this).parents(".li-item").remove();
281
			
282 282
		})
283 283
		
284 284
	}

+ 2 - 2
js/informLeaveW.js

@ -108,7 +108,7 @@
108 108
	LeaveWord.prototype.autoGrow = function() {
109 109
		document.getElementById("tt").style.width = this.scrollWidth + "px";
110 110
		document.getElementById("tt").value = this.value;
111
		this.style.height = document.getElementById("tt").scrollHeight + "px";
111
		this.style.height = this.scrollHeight + "px";
112 112
	}
113 113
	LeaveWord.prototype.bindEvent = function() {
114 114
		var self = this;
@ -127,7 +127,7 @@
127 127
					break;
128 128
				case "hReply btnModel":self.replyLword(target,obj.id)
129 129
					break;
130
				case "qCancel": $(target).parent().siblings("textarea").val("").parents(".replyLeword").addClass("displayNone").siblings(".operateSpan").removeClass("displayNone")
130
				case "qCancel": $(target).parent().siblings("textarea").val("").parents(".replyLeword").addClass("displayNone").siblings(".operateSpan").removeClass("displayNone");$(target).parent().siblings("textarea").style.height='38px';
131 131
					break;
132 132
			}
133 133
		});

+ 1 - 1
js/leaveWord.js

@ -148,7 +148,7 @@
148 148
	LeaveWord.prototype.autoGrow=function(){
149 149
		document.getElementById("tt").style.width=this.scrollWidth+"px";
150 150
		document.getElementById("tt").value=this.value;
151
		this.style.height=document.getElementById("tt").scrollHeight+"px";
151
		this.style.height=this.scrollHeight+"px";
152 152
	}
153 153
	LeaveWord.prototype.bindEvent = function() {
154 154
		var self = this;