javascript - Bootstrap nav pills with / sign in the tab link don't works -
i'm using bootstrap nav pills. if put / sign link of tab, tab not work, throws javascript error in jquery own code if click it. how can fix this?
<ul class="nav nav-pills"> <li class="active"><a data-toggle="pill" href="#ax">first</a></li> <li><a data-toggle="pill" href="#b/x">second / sign</a></li> <li><a data-toggle="pill" href="#cx">third</a></li> </ul>
the character /
special character, means have escape it.
adding \
in front of it.
your final code like:
<ul class="nav nav-pills"> <li class="active"><a data-toggle="pill" href="#ax">first</a></li> <li><a data-toggle="pill" href="#b\/x">second / sign</a></li> <li><a data-toggle="pill" href="#cx">third</a></li> </ul>
Comments
Post a Comment