javascript - jQuery ui Selectable() need ctrl+click to select but I want draggable+ multi click to select -
i using selectable()
of jquery-ui, working perfect me while clicking ctrl+click , dragging also.
but want change ctrl+click single click, , click select squares row.
here example, single click select squares. need this. http://www.social-contests.com/check-image/
thanks much...
$cover.selectable({ stop: function () { var total = $('.square').size(); var selected = $('.square.ui-selected').size(); var percent = math.round(selected * 100 / total); var alert = $('#score').find('.alert').addclass('hide'); if (percent <= 20) { $('#score').find('.alert-success').removeclass('hide'); } else { $('#score').find('.alert-error').removeclass('hide'); } $("#score").find('span.score-value').html(percent); } });
it wasn't easy :) think found solution. had dig source code, , found can simulate press ctrlkey
. solution easy:
event.originalevent.ctrlkey = true;
note if set true
this:
event.ctrlkey = true;
it not give effect.
Comments
Post a Comment