Are the following treated the same in foundation 5?
<nav class="top-bar" data-topbar role="navigation">
<nav class="top-bar" data-topbar="" role="navigation">
I am asking because I am using Scala to produce HTML from the backend. I am not sure if I can use Scala to produce HTML like this
<nav class="top-bar" data-topbar role="navigation">
This all kind of stems me looking at this example and seeing that data-topbar doesn't have an ="stuff" http://foundation.zurb.com/docs/components/topbar.html
It's a custom attribute, so are you are really saying is it's empty by either doing
or
They are most generally used to for javascript to get values from. Like you could use jquery to do something like
You can checkout more on custom attributes here - https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes