Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 48 lines (39 sloc) 0.934 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

<p>You should be able to resize the box below by dragging the grey handle.</p>
<p>The links below the box should allow you to enable or disable the drag behavior.</p>

<style>

#textresizer {
width: 250px;
background: #ddd;
border-bottom: 1px solid #333;
height: 4px;
cursor: s-resize;
margin-bottom: 10px;
}

textarea#comment {
width: 250px;
height: 100px;
}

#wrapper {
float: left;
}

</style>


<div class="wrapper">
<form>
<textarea id="comment"></textarea>
<div id="textresizer"></div>
</form>
<div id="togglers"><a id="enable">enable drag</a> | <a id="disable">disable drag</a></div>
</div>

<script src="/depender/build?require=More/Drag"></script>
<script>
var dragger = $('comment').makeResizable({
handle: $('textresizer'),
modifiers: {x: false, y: 'height'}
});
$('enable').addEvent('click', function(){
dragger.attach();
});
$('disable').addEvent('click', function(){
dragger.detach();
});
</script>
Something went wrong with that request. Please try again.