How do I do this in HAML when i have HTML 5 Data attributes without value
<p class="title" data-section-title><a href="#mypanel">Panel</a></p>
I have done this, but HAML raises an error
%p{ class: "title", data: { section: {:title}}}= link_to "Panel", "#mypanel"
Thanks
I just finished writing this out for a project I'm working on. I couldn't find it within the foundation docs.
.large-12.columns
.section-container.auto{:data => {'section' => true}}
%section
%p.title{:data => {'section-title' => true}}
%a{:href=>"#panel1" } Section 1
.content{:data => {'section-content' => true}}
%p Content of section 1
%section
%p.title{:data => {'section-title' => true}}
%a{:href=>"#panel2" } Section 2
.content{:data => {'section-content' => true}}
%p Content of section 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With