When i insert html block (below) from foundation documentation, into react component
<div className="top-bar" id="top-bar">
<div className="top-bar-title">
<span data-responsive-toggle="responsive-menu" data-hide-for="medium">
<button className="menu-icon dark" type="button" data-toggle></button>
</span>
<strong>Site Title</strong>
</div>
<div id="responsive-menu">
<div className="top-bar-left">
<ul className="dropdown menu" data-dropdown-menu>
<li>
<a href="#">One</a>
<ul className="menu vertical">
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</div>
<div className="top-bar-right">
<ul className="menu">
<li><input type="search" placeholder="Search"/></li>
<li><button type="button" className="button">Search</button></li>
</ul>
</div>
</div>
</div>
is throwing error when click on toggle button
el.data(...).split is not a function
problem is withing data-toggle attribute. react render the line below
<button className="menu-icon dark" type="button" data-toggle></button>
to
<button class="menu-icon dark" type="button" data-toggle="true"></button>
so specifing =""
<button className="menu-icon dark" type="button" data-toggle=""></button>
fixes the problem
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