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> 

jsfiddle

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

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -