Insert external html into the div with load.

<script type="text/javascript">$('#menu2').load('menu2/menu2.html');</script> 

Sees only IE, and then asks permission to execuX activX. Neither Opera, Google Chrome can not see anything - the div is just empty.

    1 answer 1

    I give 100% guarantee that this code is not called on the event $ (document) .ready () . Try this:

     $(document).ready(function(){ $('#menu2').load('menu2/menu2.html'); }) 

    I'm right? xD

    • What in the forehead, what on the forehead ... Somewhere there is a mistake. In the header - <script type = "text / javascript" language = "javascript" src = "jquery-latest.js"> </ script> in body - <DIV id = "Layer7" align = "center"> <BR> <div id = "menu2"> </ div> <SCRIPT type = "text / javascript"> $ (document). ready (function () {$ ('# menu2'). load ('menu2.html'); } </ script> </ DIV> ........... plus the editor has started asking for the lost ")" - veles
    • one
      Of course, it will ask for "ready (" not closed ")". - korok