Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Anything Slider: Howto prevent click on thumbNav

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31456
    hugogmg
    Member

    Hello everybody.
    As my first post I will introduce my self. I am Hugo Gómez Mac Gregor, web developer from Argentina.

    I’ve been working a lot with anything slider. It rock’s.
    But recently I have to make a twist with this plugin and here is where i need your help.

    The site: Nanotek
    The goal: To prevent the anchors within #thumbNav to fire the click event or whatever is attached to it.
    The problem: I have been trying with something like this with no result:

    $("#thumbNav a").click(function(event){
    event.preventDefault();
    event.stopPropagation();
    return false;
    });

    I have also tried with no success:

    $("#thumbNav a").die("click");

    Does anybody has any sugestion?
    Thanks in advanced,
    Bests,
    Hugo

    #63145
    jamygolden
    Member

    Welcome to the forums Hugo =)

    What about floating an invisible div ontop of the nav area?

    $("#thumbNav").before("
    ");

    CSS:

    #thumbOverlay{
    height:270px;
    position:absolute;
    right:28px;
    top:100px;
    width:430px;
    }
    #63149
    hugogmg
    Member

    Hello Jamy_za,
    Thank you for your quick reply and interest.

    I have to say that it worked using the “after” instead of “before” function. This change was neccesary because of the natural order of the layers (z-index);
    So, thanks a LOT!!!
    A Simple solution!

    Bests,
    Hugo.

    #63154
    hugogmg
    Member

    By the way… Is there a javascript solution to prevent the trigger?

    This would make cleaner the HTML.

    Thanks,

    Hugo

    #63155
    jamygolden
    Member

    One would have to possibly edit the plugin in order to prevent the trigger.

    Another option would be:

    #thumbNav:after{
    content:"";
    height:270px;
    width:430px;
    position:absolute;
    right:0;
    top:0;
    z-index:1000;
    }

    No HTML used.

    #63157
    hugogmg
    Member

    I understand what are you proposing. But with the :after we are bound to use and update the css properties within that JS snippet for every design.

    Thanks for posting back. I ‘ll try to look for a solution

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.