4 ms·
It'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 Wor
by _pius 18y ago
It'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 18y agoGlad I asked. I had no idea there was such a close relationship.