Navbar stops working when you have an iframe on the page

Asked

Viewed 133 times

0

I’m using Bootstrap 2.3, I have one navbar that always worked well, but after I started using a iframe on one page, my navbar stopped working, it keeps being displayed normally, but its links stopped working, I click on a link and nothing happens, now if I remove the iframe page back to work perfectly.

Is there any incompatibility in this component (navbar) of Bootstrap when using iframes?

  • You can edit your question and put the codes of the navbar and of iframe?

1 answer

2

Erikson, as far as I know, there is no incompatibility between Boostrap and the element iframe.

What happens is that the iframe almost always loads another page, sometimes even externally to the domain used. As you have not given an example of what and how you are doing, I believe you are loading another page. And it may happen that this other page is calling scripts and this yes may be interfering in the navigation bar.

Just like test form, I created a code on JS Bin using the Boostrap 2.3.2 and added a navbar whose code I copied from Boostrap’s own example.

I added to my code a iframe and in it I called the UOL site in attribute src.

See the full example in JS BIN:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.