(function (factory){ if (typeof define === "function" && define.amd) { define(["jquery", "./version"] , factory); } else { factory(jQuery); } } (function ($){ return $.fn.extend({ disableSelection: (function (){ var eventType = "onselectstart" in _AN_Call_createelement("createElement", document, "div")? "selectstart": "mousedown"; return function (){ return this.on(eventType + ".ui-disableSelection", function (event){ event.preventDefault(); } ); } ; } )(), enableSelection: function (){ return this.off(".ui-disableSelection"); } } ); } ));