Last active
March 4, 2019 14:34
-
-
Save dudelis/c63eda77fb72e07b7eaa92bcfc4ff328 to your computer and use it in GitHub Desktop.
K2 Smartforms: How to make Textarea resizable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('textarea').each(function(index, obj){ | |
$wrapper = $(obj).closest('.input-control.text-input'); | |
var width = $wrapper.width(); | |
$wrapper.css('width', ''); | |
$(obj).css('width', width + 'px'); | |
$(obj).resizable(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ui-resizable-se { | |
cursor: se-resize; | |
width: 12px; | |
height: 12px; | |
right: 1px; | |
bottom: 1px; | |
} | |
.ui-resizable-handle { | |
position: absolute; | |
z-index: 99999; | |
display: block; | |
} | |
.ui-icon-gripsmall-diagonal-se { | |
background-position: -64px -224px; | |
} | |
.ui-icon { | |
background-color: lightgray; | |
display: block; | |
text-indent: -99999px; | |
overflow: hidden; | |
background-repeat: no-repeat; | |
} | |
.ui-icon:before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
border-top: 12px solid white; | |
border-right: 12px solid lightgrey; | |
width: 0; | |
} |
Author
dudelis
commented
Nov 28, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment