Skip to content

Instantly share code, notes, and snippets.

View fredrikpersson's full-sized avatar

Fredrik Persson fredrikpersson

  • Engineering Student
  • Lund, Sweden
View GitHub Profile
@lplume
lplume / gist:766364
Created January 5, 2011 14:13
jQuery ui sortable & selectable wating jQueryUi 1.9 milestone, i put together piece of code here and there (from the web) as a workaround to get an element both sortable and selectable. Be careful... This is really a workaround..
/**
* Disable sortable while target element fired
* - mouseover event AND
* - CTRL keydown
*/
var jid_element = "#" + myElement;
var isCtrl = false;
var isOver = false;
$(jid_element).mouseover(function() {isOver = true});