External Link in Navigation Bar

Support Forums Cian – HTML Template External Link in Navigation Bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3879
    Bernard
    Participant

    Hi there. I’m trying to add an external link to one of the items in the navigation bar. It appears that there may be some JS blocking me from including external links in the nav bar.

    Could you assist please?

    • This topic was modified 6 years, 2 months ago by Bernard.
    #3882
    CreaboxThemes
    Keymaster

    Hi,

    you have to add the new menu link without the class cl-effect in this way:

    <div class="collapse navbar-collapse">
    <ul class="nav navbar-nav navbar-right">
    <li><a class="cl-effect" href="#homepage">Home</a></li>
    ...
    <li><a href="http://www.external-link.com">External link</a></li>
    ...
    <li><a class="cl-effect" href="#contact">Contact</a></li>
    </ul>
    </div> 

    Then, you have to edit the file custom.js (folder js). In this file, you have to change the scrollTo function. About the line 55, edit the selector. Now, the value in the next:

    $('.navbar-nav li a').bind('click', function(e) {
    ...
    });

    It has to be changed to the next code:

    $('.navbar-nav li a.cl-effect').bind('click', function(e) {
    ...
    });

    Regards

    #3885
    Bernard
    Participant

    great thanks!

    #3886
    CreaboxThemes
    Keymaster

    Your welcome 😉

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.