Navbar stops working when you have an iframe on the page

0

I'm using Bootstrap 2.3, I have a navbar which always worked fine, but after I started using iframe on a page, my navbar stopped working, it keeps showing normally, however the links of it stopped working, I click on a link and nothing happens, now if I remove the iframe of the page works perfectly again.

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

    
asked by anonymous 29.10.2014 / 17:22

1 answer

2

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

What happens is that iframe almost always carries another page, sometimes even externally to the domain used. Since you have given no example of what and how you are doing, I believe you are carrying another page. And it may happen that this other page is calling scripts and this may be interfering with the navigation bar.

Just as a test, I've created a code in JS Bin using Boostrap 2.3.2 and added a navbar whose code I copied from the Boostrap site example itself.

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

See the full example in JS BIN:

    
22.01.2015 / 20:32