Dropdown links stopped working

Hi,

Can someone help? The dropdown links have stopped working and I don’t know why/how?

It is because your section is over the top of it. You will need to change the z-index to make it go below the navigation.

You also have an error in your javascript, it looks like you are trying to run some jQuery, without having jQuery

1 Like

Hi and thank you.

I did something which helped a bit but I don’t know how to change the z-index, how do I do that?

I’m just going to delete some stuff and redo that section.

In your section style add: z-index: -1;

You can experiment with the number to suit.

1 Like

There’s a rule in your CSS that reads…

*{
    outline:0;
    z-index:2
}

I would get rid of this. There are also an awful lot of inline styles, which can make it very difficult to track down issues. I’d recommend moving as many of these inline styles to your custom stylesheet as possible.

Bootstrap does a pretty good job of assigning z-index values to the major components (like navbars) such that you should rarely need to change these values.

2 Likes

Hi, thanks for your help.

I think I accidentally deleted the bit that made the dropdown work so I just replaced the navbar.

I keep seeing the inline styles thing highlighted in ‘Check For Issues’ but I don’t know how to move them over yet.

Could you show me how fix this javascript error? I don’t recall trying to do anything with jQuery

Thank you

In your design you have a javascript file with this code

var jumboHeight = $(".jumbotron").outerHeight();
function parallax() {
    var e = $(window).scrollTop();
    $(".jumbotron").css("background-position", "center " + -.2 * e + "px"),
    console.log(jumboHeight - e)
}
$(window).scroll((function(e) {
    parallax()
}
));

delete that javascript file

You don’t have any element with the classname jumbotron so even if you would adding jQuery that script wouldn’t do anything.
If you add a jumbotron the script would have moved the background-image up before the jumbotron and only showed a part of the background-image within the jumbotron

3 Likes

Hi,

Thanks, I deleted it.

A quick video to show you how.

3 Likes

Hey, thanks for showing me this. I did it for a couple and it worked but, I’ve got 913 components with inline styles…is there a quick way to do this? Thanks again

Please, ignore my last message, i’m moving it all over.