README.md in opal-jquery-0.3.0 vs README.md in opal-jquery-0.4.0
- old
+ new
@@ -288,9 +288,25 @@
request.errback { |response|
puts "failed with status #{response.status_code}"
}
```
+## Usage of JQuery plugins
+Extra plugins used for JQuery aren't available to ruby code by default, you will have to `expose` these functions to opal-jquery.
+
+```ruby
+Element.expose :cool_plugin
+```
+
+Arguments to a `exposed` function will be passed as they are, so these arguments will have to be passed as native JS instead of ruby code. A conversion to native JS can be done with the `.to_n` method.
+
+```ruby
+Element.expose :cool_plugin
+
+el = Element['.html_element']
+el.cool_plugin({argument: 'value', argument1: 1000}.to_n)
+```
+
## License
(The MIT License)
Copyright (C) 2013 by Adam Beynon