jQuery sortable (how to customize the clickable area inside the sortable box)

Posted by cvack on Stack Overflow See other posts from Stack Overflow or by cvack
Published on 2010-05-04T10:03:42Z Indexed on 2010/05/04 10:08 UTC
Read the original article Hit count: 488

Filed under:
|
|

I have this jQuery code:

$(".right_box_holder").sortable({ 
        update : function () { 
            var order = $('.right_box_holder').sortable('serialize'); 
            $.get("right_menu_functions.php?change_sortorder&"+order);
        }   
    });

and this HTML code:

<div class='right_box_holder'>
  <div class='right_box' id='box_0'>
    // sort box 0
  </div>
  <div class='right_box' id='box_1'>
    // sort box 1
  </div>
  <div class='right_box' id='box_2'>
    // sort box 2
  </div>
</div>

As it is now, I can click anywhere inside .right_box and move it. I want to disable this and make a button / icon inside .right_box which the user have to click on to drag the box. Is this possible?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about sortable