Closed richiej053 closed 6 years ago
Is there a way to assign an attribute to the parent ul without assigning it to the subsequent children? I have tried ulAttr(['class' => 'someClass']) but that asigns the class to all the ul elements.
ul
ulAttr(['class' => 'someClass'])
<ul class="someClass"> <li><a href="">T-shirts <ul> <li><a href="red-t-shirt">Red T-shirt</a></li> <li><a href="black-t-shirts">Black T-shirts</a></li> </ul> </li> <li><a href="">Sweaters <ul> <li><a href="red-sweaters">Red Sweaters</a></li> <li><a href="blue-sweaters">Blue Sweaters</a></li> </ul> </li> </ul>
Added: firstUlAttr()
Update the package.
Is there a way to assign an attribute to the parent
ul
without assigning it to the subsequent children? I have triedulAttr(['class' => 'someClass'])
but that asigns the class to all theul
elements.