views:

659

answers:

2

I can get the drag to work, but the resizing is not cooperating. (The behavior is evident using either the text box or the text area.) I'm using jQuery 1.3.2 and jQuery UI 1.7.2.

Here's my attempt:

<HTML> 
<HEAD> 
 <TITLE>Drag/Resize TextBox Workbench</TITLE> 
 <script src="js/jquery.js" type="text/javascript" ></script>
 <script src="js/ui/ui.core.js" type="text/javascript"></script>
 <script src="js/ui/ui.draggable.js" type="text/javascript"></script>
 <script src="js/ui/ui.resizable.js" type="text/javascript"></script>
 <script type="text/javascript"> 
$(document).ready(function() {
    $( "#ta1" ).resizable( { cancel: '' } );
    $( "#ta1" ).draggable( { cancel: '' } );
});
     </script>
    </HEAD>
    <BODY>
     <form>
      <input type='text' class='property' id='tb1' />
      <textarea id='ta1' class='property'>Hello</textarea>
     </form>
    </BODY>
</HTML>
A: 

Have you tried wrapping the <textarea> in a <div> or another block-level tag and making that draggable instead?

mjangda
That still wouldn't help in making it resizable, though.
Paul Lammertsma
I wrapped both elements in individual spans and they both seem to behave now. I can resize and drag.
Danno
A: 

jQuery Textarea Resize plugin

Josh Stodola