Menu not linking to external link

Support Forums Cian – HTML Template Menu not linking to external link

Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3795
    Liana
    Participant

    Hi there,

    I can see you have the scroll easing effect on the nav items, however what do I do if I want just one of those items in the menu bar to link to an external page?

    Thanks in advance,
    Liana

    #3798
    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

    #3799
    Liana
    Participant

    Thank you very much – all working!

    #3801
    CreaboxThemes
    Keymaster

    You’re welcome

    #3808
    Liana
    Participant

    Hi,

    If I want to add an external link to one of the buttons in the header section (where the image slider is) how do I go about doing that?

    Thank you in advance,
    Liana

    #3809
    CreaboxThemes
    Keymaster

    Hi,

    For example, in the default file index.html, in the line 114, you would have to edit the link. Now, the code is:

    <a class="btn btn-default learn" href="#">Learn more</a>

    You would have to change the value href in this way:

    <a class="btn btn-default learn" href="http://www.your-link.com">Learn more</a>

    Regards

    #3810
    Liana
    Participant

    Yes, I did this, but for some reason it’s just not responding/linking.

    #3811
    CreaboxThemes
    Keymaster

    Hi,

    I don’t know why you have that problem. I have made a test and it works fine. I have typed the next code:

    <a class="btn btn-default learn" href="http://www.google.es">Learn more</a>

    Regards

    #3814
    Liana
    Participant

    Stupid me, it was because I put:

    $(‘.but’).bind(‘click’, function(e) {
    e.preventDefault();
    var target = this.hash;
    $.scrollTo(target, 1250, {
    easing: ‘swing’,
    axis: ‘y’,
    offset: -45
    });
    });

    All working now. Sorry for that.

    #3815
    CreaboxThemes
    Keymaster

    Ok 🙂

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