problem with function load()

problem with function load()

Hi All,

My problem is:
I have the site  where I use the load function to make the menu. The html page looks like:

<body>
    <div id="all">
        <div id="content">
            <div id="bar1"><p>Lalalala.</p></div>
        </div>
       
            <ul id="menu">
                <li class="active"><a href="#" class="bar1">About us</a></li>
                <li><a href="#" class="bar2">Gallery</a></li>
                <li><a href="#" class="bar3">Contact</a></li>
            </ul>
       
    </div>
</body>
 
<script type="text/javascript">

        $().ready(function()
        {
            $("ul#menu li a").click(function()
            {
                $("#menu .active").removeClass("active");
                $(this).parent().addClass("active");

                var classname = $(this).attr("class");

                $("#bar1").load(classname+".html");

                return false;
            });
        });

    </script>































The pages: bar1.html, bar2.html and bar3.html work properly, but when I put into the bar2.htm a gallery which is based on: http://galleria.aino.se/
the page began to behave abnormally. When I click the 'Gallery' at first all is ok, when I click it next time, the page began to load the gallery again and again - the browser can't work.

Can anyone tell me what is wrong ?












    • Topic Participants

    • mitos