Navigation Menu

Skip to content

Commit

Permalink
Update README.markdown
Browse files Browse the repository at this point in the history
Updated README
  • Loading branch information
robconery committed Dec 21, 2012
1 parent 3ad956b commit 548d487
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.markdown
Expand Up @@ -28,10 +28,20 @@ The cart needs KnockoutJS (2.x or greater) and jQuery. Make sure you have those,

You can open a console to play with the cart if you like - it's namespaced under Tekpub.Cart.

## Usage
The cart works based on bindings, as well as data attributes set on the HTML markup. **You do not need to use it this way** but if you want Fun Out of The Box you can.

Here's an example:

```html
<button data-bind='click:addClicked' data-description='Tekpub Yearly Subscription' data-price='149.0' data-sku='yearly'>Give</button>
```
The button's click event is bound to the Knockout Cart's click event handler. It will pull off the `data-*` attributes as needed.

## Tests

The Jasmine tests are under the "spec" directory. Just double click the file to run. I'll be adding more of them over time.

## Help and Issues

As always - if there's something you think could be done better, we're all ears. If you can provide a pull request - that's even better!
As always - if there's something you think could be done better, we're all ears. If you can provide a pull request - that's even better!

0 comments on commit 548d487

Please sign in to comment.