Permalink
Browse files

Fairly small tweak to add support for passing args as data attributes on

the select.

eg:

<select data-url="http://callbackurl">

Works well/saves effort when the urls may change and so have to be parsed out of the
dom somehow.
  • Loading branch information...
1 parent 278e2bb commit 7104884b242ec186604c26f3f24607e3f1d395ae @benlumley committed Apr 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ajax-chosen.coffee
View
@@ -12,7 +12,7 @@ do ($ = jQuery) ->
chosenXhr = null
# Merge options with defaults
- options = $.extend {}, defaultOptions, settings
+ options = $.extend {}, defaultOptions, $(select).data(), settings
# Load chosen. To make things clear, I have taken the liberty
# of using the .chzn-autoselect class to specify input elements

0 comments on commit 7104884

Please sign in to comment.