I've read all of the documentation I can find and it is a bit spotty. Can someone tell me how to use jquery's .html() method in the ruby -> jquery bridge opal-jquery?
Also any advice for how I would go about figuring out implemented methods in a sparsely documented gem in the future would definitely be appreciated.
Asked
Active
Viewed 316 times
4
ylluminate
- 12,102
- 17
- 78
- 152
rabbitfeetz
- 87
- 7
1 Answers
5
jQuery's .html() method in opal-jquery is mapped as Element#html and Element#html=.
The latter is definitively more like Ruby and is obviously there to set HTML content.
For convenience though you can still use #html as both a setter (with an argument) or a getter (no arguments).
This is where .html() is aliased as #html=:
This is where #html is defined:
marc_s
- 732,580
- 175
- 1,330
- 1,459
Elia Schito
- 989
- 7
- 18