Skip to content

Commit

Permalink
Attach Select instance to data(select) to the <select> in addition to…
Browse files Browse the repository at this point in the history
… the target
  • Loading branch information
adamschwartz committed Dec 14, 2013
1 parent 8ee8814 commit 3fcb07f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions select.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Select
@setupDrop()
@renderDrop()

@setupSelectEvents()
@setupSelect()

setupTarget: ->
$options = @$select.find('option')
Expand Down Expand Up @@ -160,7 +160,9 @@ class Select

@dropSelect.$drop.find('.drop-content').html $dropSelectOptions[0]

setupSelectEvents: ->
setupSelect: ->
@$select.data 'select', @

@$select.on 'change', =>
@renderDrop()
@renderTarget()
Expand Down
5 changes: 3 additions & 2 deletions select.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion select.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3fcb07f

Please sign in to comment.