Skip to content

Commit e619a1f

Browse files
committed
comment textbox styling
1 parent 8048184 commit e619a1f

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/components/Comments.vue

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</ul>
2626
<form class="form-inline" role="form">
2727
<div class="form-group">
28-
<input class="form-control" type="text" placeholder="Your comments" v-model="newcomment"/>
28+
<input class="form-control" type="text" id="box" style="width: 300px; height: 20px" placeholder="Your comments" v-model="newcomment" v-on:focus='textboxFocus($event)' v-on:blur='textboxBlur($event)'/>
2929
</div>
3030
<div class="form-group">
3131
<!-- <button class="btn btn-default" v-on:click='submit($event)'>Add</button> -->
@@ -81,7 +81,25 @@
8181
this.newcomment = '';
8282
});
8383
84-
}
84+
},
85+
86+
textboxFocus(e){
87+
$(e.currentTarget).animate({
88+
width: '150px',
89+
height: '100px'
90+
}, 500, function() {
91+
// Animation complete.
92+
});
93+
},
94+
95+
textboxBlur(e){
96+
$(e.currentTarget).animate({
97+
width: '100px',
98+
height: '20px'
99+
}, 500, function() {
100+
// Animation complete.
101+
});
102+
},
85103
},
86104
87105
beforeUpdate(){

0 commit comments

Comments
 (0)