4 ms·
"Jquery + Haml is a very close impedance match" - is that another way of saying they're a good combo or is there more to it than that?
by villageidiot 17y ago
"Jquery + Haml is a very close impedance match" - is that another way of saying they're a good combo or is there more to it than that?
- _pius 17y agoIt's actually more specific than that. Take the following Haml that defines a div with an id of "foo" along with a span with class "bar" and content "Hello World": #foo %span.bar Hello World If I wanted to hide those elements, I'd write the following jQuery in a separate file: $('#foo').hide(); $('span.bar').hide(); That's really powerful stuff. The Haml syntax for defining elements looks exactly like the CSS3-style selectors used by jQuery, so much so that I often cut and paste my Haml markup into my javascript files.
- villageidiot 17y agoGlad I asked. I had no idea there was such a close relationship.