Commit 2d3a0bab authored by Jacob Thornton's avatar Jacob Thornton
Browse files

make active selector more specific #2043 and rebuild

parent 4a276b16
Showing with 31 additions and 18 deletions
+31 -18
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
} }
, to: function (pos) { , to: function (pos) {
var $active = this.$element.find('.active') var $active = this.$element.find('.item.active')
, children = $active.parent().children() , children = $active.parent().children()
, activePos = children.index($active) , activePos = children.index($active)
, that = this , that = this
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
this.$element[dimension](0) this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown') this.transition('addClass', $.Event('show'), 'shown')
this.$element[dimension](this.$element[0][scroll]) $.support.transition && this.$element[dimension](this.$element[0][scroll])
} }
, hide: function () { , hide: function () {
......
...@@ -77,9 +77,7 @@ ...@@ -77,9 +77,7 @@
} }
, lookup: function (event) { , lookup: function (event) {
var that = this var items
, items
, q
this.query = this.$element.val() this.query = this.$element.val()
...@@ -87,7 +85,15 @@ ...@@ -87,7 +85,15 @@
return this.shown ? this.hide() : this 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) return that.matcher(item)
}) })
...@@ -290,4 +296,4 @@ ...@@ -290,4 +296,4 @@
}) })
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
} }
, to: function (pos) { , to: function (pos) {
var $active = this.$element.find('.active') var $active = this.$element.find('.item.active')
, children = $active.parent().children() , children = $active.parent().children()
, activePos = children.index($active) , activePos = children.index($active)
, that = this , that = this
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
this.$element[dimension](0) this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown') this.transition('addClass', $.Event('show'), 'shown')
this.$element[dimension](this.$element[0][scroll]) $.support.transition && this.$element[dimension](this.$element[0][scroll])
} }
, hide: function () { , hide: function () {
...@@ -1676,9 +1676,7 @@ ...@@ -1676,9 +1676,7 @@
} }
, lookup: function (event) { , lookup: function (event) {
var that = this var items
, items
, q
this.query = this.$element.val() this.query = this.$element.val()
...@@ -1686,7 +1684,15 @@ ...@@ -1686,7 +1684,15 @@
return this.shown ? this.hide() : this 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) return that.matcher(item)
}) })
...@@ -1889,4 +1895,4 @@ ...@@ -1889,4 +1895,4 @@
}) })
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
This diff is collapsed.
...@@ -1454,9 +1454,9 @@ $('.carousel').carousel({ ...@@ -1454,9 +1454,9 @@ $('.carousel').carousel({
<tbody> <tbody>
<tr> <tr>
<td>source</td> <td>source</td>
<td>array</td> <td>array, function</td>
<td>[ ]</td> <td>[ ]</td>
<td>The data source to query against.</td> <td>The data source to query against. May be an array of strings or a function. The function is passed two arguments, the <code>query</code> value in the input field and the <code>process</code> callback. The function may be used synchronously by returning the data source directly or asynchronously via the <code>process</code> callback's single argument.</td>
</tr> </tr>
<tr> <tr>
<td>items</td> <td>items</td>
...@@ -1497,6 +1497,7 @@ $('.carousel').carousel({ ...@@ -1497,6 +1497,7 @@ $('.carousel').carousel({
</div> </div>
</section> </section>
<!-- Footer <!-- Footer
================================================== --> ================================================== -->
<footer class="footer"> <footer class="footer">
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
} }
, to: function (pos) { , to: function (pos) {
var $active = this.$element.find('.active') var $active = this.$element.find('.item.active')
, children = $active.parent().children() , children = $active.parent().children()
, activePos = children.index($active) , activePos = children.index($active)
, that = this , that = this
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment