Permalink
Browse files

More component/dom and component/menu related fixes

  • Loading branch information...
charypar committed Jan 22, 2014
1 parent 0f09daf commit 10473e09b39d37cc3e4015727a8bde35cf9b7e73
Showing with 4 additions and 4 deletions.
  1. +4 −4 index.js
View
@@ -56,13 +56,13 @@ function Dropdown(ref, opts) {
if (this.options.select) this.focus(this.options.select);
}
- this.ref.on('click', this.onclick.bind(this, this.ref.get(0)));
+ this.ref.on('click', this.onclick.bind(this, this.ref[0]));
this.on('select', this.focus.bind(this));
this.checked = [];
// reference element class handler
- var refclasses = classes(ref.get(0));
+ var refclasses = classes(ref[0]);
this.on('show', function(){ refclasses.add('opened'); });
this.on('hide', function(){ refclasses.remove('opened'); });
}
@@ -125,13 +125,13 @@ Dropdown.prototype.focus = function(slug){
return this.emit('uncheck', this.current, this.checked);
}
} else if (new_selection) {
- classes(this.items[this.current].get(0)).remove('current');
+ classes(this.items[this.current]).remove('current');
}
}
if (new_selection) {
if (this.options.selectable) {
- var mtd = 'input' == this.ref.get(0).tagName.toLowerCase() ? 'val' : 'html';
+ var mtd = 'input' == this.ref[0].tagName.toLowerCase() ? 'val' : 'html';
this.ref[mtd](o(selected).find('a').html());
this.emit('focus', slug);
}

0 comments on commit 10473e0

Please sign in to comment.