README.md in abracadabra-1.1.4 vs README.md in abracadabra-1.2.0

- old
+ new

@@ -29,12 +29,18 @@ ```css *= require abracadabra ``` -In your `application.js`, AFTER Jquery (required), include the javascript file: +OR if you're using SASS/SCSS: +```sass + @import "abracadabra-scss"; +``` + +In your `application.js`, AFTER JQuery (required), include the javascript file: + ```js //= require abracadabra ``` ## Helpers @@ -57,19 +63,19 @@ - `path: user_path(@user)` - Specifies where the form will be submitted. - `attribute: :name` - Specifies what attribute your text field will be updating. #### OPTIONAL -- `class: "my-class"` - Class(es) to be added to the abracadabra link. The class "abracadabra" is added # either way. [*Default:* `"abracadabra"`] +- `class: "my-class"` - Class(es) to be added to the abracadabra link. The class "abracadabra" is added either way. [*Default:* `"abracadabra"`] - `id: "my-id"` - ID to be added to the abracadabra link. [*Default:* `nil`] - `value: "blah"` - An alternate value, other than what object.attribute would return. [*Default:* `object.attribute`] - `method: "patch"` - HTTP REST method to use. Use anything but "get". [*Default:* `"patch"`] -- `buttonless: true` - Removes submit and cancel buttons, submission and cancellation is then one through the Enter/Tab and Escape keys, respectively. [*Default:* `false`] +- `buttonless: true` - Removes submit and cancel buttons. Submission and cancellation is then done through the Enter/Tab and Escape keys, respectively. [*Default:* `false`] - `remote: true` - Same as link_to's `remote: true`, form submits via AJAX. [*Default:* `true`] - `type: :js` - Content type -- responds to any content type (`:js` and `:script` are interchangeable). [*Default:* `:script`] ***IMPORTANT: `type` will be ignored if `remote = false` is used. HTML is the default in Rails for standard form submissions.*** @@ -103,9 +109,17 @@ deletable: "Are you sure?", deletable_path: user_friends_path(@friend), deletable_type: :json, tab_to_next: "#my-abracadabra-#{index+1}", submit_on_blur: true +``` + +#### REBINDING + +Simply call abracadabra's jQuery function: + +```javascript + $.abracadabra(); ``` ## Configuration Abracadabra allows some customization. If you would like to change what icon classes are used for the `submit`, `cancel`, and `delete` icons, you can change them globally.