diff --git a/.gitignore b/.gitignore index aa9510b..4dadc49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ selectordie_dev.js -index_dev.html \ No newline at end of file +index_dev.html +_src/selectordie.dev.js diff --git a/_src/selectordie.js b/_src/selectordie.js index 590c333..0665851 100644 --- a/_src/selectordie.js +++ b/_src/selectordie.js @@ -1,8 +1,8 @@ /* =========================================================== * * Name: selectordie.js - * Updated: 2014-09-17 - * Version: 0.1.6 + * Updated: 2014-10-09 + * Version: 0.1.7 * Created by: Per V @ Vst.mn * What?: The Select or Die JS * @@ -16,8 +16,9 @@ * =========================================================== */ ; (function ($) { + "use strict"; + $.fn.selectOrDie = function (method) { - "use strict"; var $defaults = { customID: null, // String - "" by default - Adds an ID to the SoD @@ -33,6 +34,7 @@ onChange: $.noop // Adds a callback function for when the SoD gets changed }, $_settings = {}, + $_sodKeysWhenClosed = false, $_sodFilterTimeout, $_sodViewportTimeout; var _private = { @@ -40,7 +42,7 @@ initSoD: function (options) { $_settings = $.extend({}, $defaults, options); - return this.each(function (i) { + return this.each(function () { if ( !$(this).parent().hasClass("sod_select") ) { var $select = $(this), @@ -99,13 +101,13 @@ "class": "sod_list_wrapper" }).appendTo($sod); - // Inserts a