Commits

Mark Lavin  committed fca4c43

Move url into source function closure.

  • Participants
  • Parent commits 09ae5aa

Comments (0)

Files changed (1)

File selectable/static/js/jquery.dj.selectable.js

 	$.widget("ui.djselectable", {
         _create: function() {
             var self = $(this),
-            input = this.element;
+            input = this.element,
             type = $(input).attr('data-selectable-type');
             
-            
             var allowAttr = $(input).attr('data-selectable-allow-new');
             var allowNew = false;
             if (typeof allowAttr !== 'undefined' && allowAttr === 'true') {
             }
 
             function dataSource(request, response) {
+                var url = $(input).attr('data-selectable-url');
                 var now = new Date().getTime();
 				$.getJSON(url, {
 					term: request.term,