views:

28

answers:

2

this is my code :

<div id="test" style="width:200px;height:100px;background:red" class="tabs change_font_size">
      <div>
          <a class="delete" style="float:right;font-size:20px;text-decoration:underline;cursor:pointer;">delete</a>
          <form action="/" style="background:blue">
              <input type="text" name="text"/>
              <input type="submit" value="submit"/>
          </form>
      </div>
  </div>

$('#test').draggable()

you can run this code in this http://jsfiddle.net/8vntr/1/

alt text

i can drag the red div, but i can't drag the blue form ,

what can i do ?

thanks

+1  A: 

Putting the form tag outside the draggable div seems to work.

<form action="/">
<div id="test" style="width:200px;height:100px;background:red" class="tabs change_font_size">
      <div>
          <a class="delete" style="float:right;font-size:20px;text-decoration:underline;cursor:pointer;">delete</a>
          <div>
              <input type="text" name="text"/>
              <input type="submit" value="submit"/>
          </div>
      </div>
  </div>
</form>
jay.lee
A: 

set the form height and width to 0 :

           <form action="/" style="background:blue,width:0;height:0;">
            <input type="text" name="text"/>
            <input type="submit" value="submit"/>
        </form>
zjm1126