Adding an external link to a nav bar using bootstrap

twitter-bootstrap

Solution

I had the same problem; I just redirect to external link with JQuery as follows:

HTML:

<ul class="nav">
    <li><a href="http://www.google.com" class="external">External</a></li>
    <li>...</li>
</ul>

JQuery:

function changePage(event) {
    if($(event.target).hasClass('external')) {
        window.location.href = $(event.target).attr('href');
        return;
    }
    //...
}
$(function () {
    $('.nav li').click( changePage );
}

Problem

Is it possible to include an external link in a nav bar utilizing bootstrap? When I wrap the Menu item text in an a link tag, the link doesn't work...am I missing something? Specifically, I would like to add an external link to a navigation menu in which the other items just link to areas on the page.

Original source