I cant understand why I cant make a bootstrap nav tab pane work properly using jade.
Here is my code:
head
title= title
link(rel='stylesheet', href='public/styles/bootstrap.css')
body
div.tabbable.tabs-below
div.tab-content
div.tab-pane.active
block content
ul.nav.nav-tabs
li.active
a(href='../', data-toggle='tab') Home
li
a(href='../about', data-toggle='tab') About
li
a(href='../blog', data-toggle='tab') Blog
li
a(href='../faq', data-toggle='tab') FAQ
li
a(href='../terms', data-toggle='tab') Terms
li
a(href='../privacy', data-toggle='tab') Privacy
li
a(href='../jobs', data-toggle='tab') Jobs
li
a(href='../press', data-toggle='tab') Press
script(src="public/js/lib/jquery.js")
script(src="public/js/lib/bootstrap.js")
I get the folllowing error in my console when clicking on ‘About’: Uncaught Error: Syntax error, unrecognized expression: ../about in jquery.js:4421
Without the data-toggle attributes it works. However, it doesn’t show which tab is selected!!
The problem has nothing to do with jade being the view engine. It is because a new page is being loaded and not a nested div in div.tab-content.
Solution: How to activate not default Bootstrap tab from outer page?