Permalink
Browse files

clarify description of callback's return value in the README

  • Loading branch information...
1 parent 4c95900 commit c42e8657cff154b16788708aa58d50cc52f8cac6 @cvrebert cvrebert committed Sep 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
@@ -8,7 +8,7 @@ This script bootstraps the existing Chosen plugin without making any modificatio
This plugin exposes a new jQuery function named `ajaxChosen` that we call on a `select` element. The first argument consists of the options passed to the jQuery $.ajax function. The `data` parameter is optional, and the `success` callback is also optional.
-The second argument is a callback that tells the plugin what HTML `option` elements to make. It is passed the data returned from the ajax call, and you have to return an object where the key is the HTML `option` value attribute and the value is the text to display. In other words:
+The second argument is a callback that tells the plugin what HTML `option` elements to make. It is passed the data returned from the ajax call, and you have to return an object where the keys are the HTML `option` elements' `value` attributes, and the values are the text to display for each option. In other words:
{"3": "Ohio"}

0 comments on commit c42e865

Please sign in to comment.