Question

Have this code

 $( ".sortable" )
  .sortable({ handle: ".handle",
  })
  .selectable()
    .find( "li" )
      .addClass( "ui-corner-all" )
      .prepend( "<div class='handle'><span class='ui-icon ui-icon-carat-2-n-s'></span></div>" );

and need set multiples handles because have two img with function onclick and doesnt work only work last handle writted ex:

 $( ".sortable" )
  .sortable({ handle: ".handle",
handle:".play",
handle:".remove"
  })
Was it helpful?

Solution

$( ".sortable" ).sortable({ handle: ".handle,.play,.remove"});

Should do the trick. I did a quick test here:

http://jsfiddle.net/x4BzU/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top