diff options
| author | Mark Otto <[email protected]> | 2012-06-02 22:14:12 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-06-02 22:14:12 -0700 |
| commit | 9a4ee790e1e58e321b604bb66380b2ce2f00faf6 (patch) | |
| tree | ac9099103a98153aeb5d69c674af5546c6aa926b /docs/assets/js/bootstrap.js | |
| parent | 9a3a297a478e1a27cce913b8d30170a6949b52f7 (diff) | |
| parent | 2d3a0babd242d7eebe09cf3f4daad38e2d7df6ee (diff) | |
| download | bootstrap-9a4ee790e1e58e321b604bb66380b2ce2f00faf6.tar.xz bootstrap-9a4ee790e1e58e321b604bb66380b2ce2f00faf6.zip | |
Merge branch '2.1.0-wip' of github.com:twitter/bootstrap into 2.1.0-wip
Conflicts:
docs/assets/js/bootstrap.min.js
Diffstat (limited to 'docs/assets/js/bootstrap.js')
| -rw-r--r-- | docs/assets/js/bootstrap.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index aad00b0ed..3987303e7 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -290,7 +290,7 @@ } , to: function (pos) { - var $active = this.$element.find('.active') + var $active = this.$element.find('.item.active') , children = $active.parent().children() , activePos = children.index($active) , that = this @@ -1676,9 +1676,7 @@ } , lookup: function (event) { - var that = this - , items - , q + var items this.query = this.$element.val() @@ -1686,7 +1684,15 @@ return this.shown ? this.hide() : this } - items = $.grep(this.source, function (item) { + items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source + + return items ? this.process(items) : this + } + + , process: function (items) { + var that = this + + items = $.grep(items, function (item) { return that.matcher(item) }) @@ -1889,4 +1895,4 @@ }) }) -}(window.jQuery);
\ No newline at end of file +}(window.jQuery); |
