Attribute

Sometimes we would like to use an attribution of an item. It is enough to use the attr feature to ensure that.

HTML
<div class="parent">
  <a href="/about">About</div>
</div>
Config
{
    "link": {
        "selector": "a",
        "attr": "href"
    },
}

// or use this shortcut

{
    "link": "a @ href"
}
Output
{
    "link": "/about" 
}

Multiple Attributes

All Attributes

Last updated

Was this helpful?