Home > Web Front-end > JS Tutorial > jquery multi-line text box (textarea) height change_jquery

jquery multi-line text box (textarea) height change_jquery

WBOY
Release: 2016-05-16 17:30:24
Original
1045 people have browsed it
Copy code The code is as follows:

$(function(){
var $comment = $( '#comment'); //Get the comment box
$('.bigger').click(function(){ //Bind the click event for the enlarge button
if(!$comment.is(": animated")){ //Determine whether it is animated
                                                                                                                                                                                               Set the height and add 50 to the original value.
🎜> if(!$comment.is(":animated")){//Determine whether it is animated
if( $comment.height() > 50 ){
$comment.animate({ height : "-=50" },400); //Reset the height and subtract 50 from the original value
                                                                                                                                   
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template