문제

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"
  })
도움이 되었습니까?

해결책

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

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

http://jsfiddle.net/x4BzU/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top