Skip to content

Commit

Permalink
Support for standard chosen options
Browse files Browse the repository at this point in the history
  • Loading branch information
sduck committed May 23, 2012
1 parent 278e2bb commit 602ba65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ajax-chosen.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
do ($ = jQuery) ->

$.fn.ajaxChosen = (settings = {}, callback = ->) ->
$.fn.ajaxChosen = (settings = {}, callback = {}, chosenOptions = ->) ->
defaultOptions =
minTermLength: 3
afterTypeDelay: 500
Expand All @@ -17,7 +17,7 @@ do ($ = jQuery) ->
# Load chosen. To make things clear, I have taken the liberty
# of using the .chzn-autoselect class to specify input elements
# we want to use with ajax autocomplete.
@chosen()
@chosen(if chosenOptions then chosenOptions else {})

@each ->
# Now that chosen is loaded normally, we can bootstrap it with
Expand Down

0 comments on commit 602ba65

Please sign in to comment.