jQuery
The jQuery filter enhances the interaction between Ruby syntax and common jQuery functionality:
- maps Ruby unary operator
~
to jQuery$
function - also maps
$$
to jQuery$
function - maps Ruby attribute syntax to jQuery attribute syntax
.to_a
becomestoArray
- defaults the fourth parameter of $$.post to
"json"
, allowing Ruby block syntax to be used for the success function.