Hello everyone.
Please forgive my lack of knowledge, I'm just learning basis of jquery.
Here is my problem:
I'm creating a website which is consisted of many links to
subpages. I've decided to use .load method to load my subpages
into the main div.
I've learned from the Internet how this method should look like
in practice and so I got jquery script for each and every link on my
website. I've made it this way:
$("#kol1").click(function(event){
$('.content').css({"border-color":"#00a0b0"});
$( ".sub-menu" ).hide();
$(".sub-menu-ot").hide();
$( ".sub-menu-dgis" ).hide();
$( "#content-main" ).load( "zapowiedzi.html" );
return false;
});
I have like 55 scripts like this. The problem is that when you
browse the website, links loads slower and slower and finaly whole web
browser freezes. On the Chrome Element Inspector it looks like when I
click one of the links from my website it loads correctly. Then, when
you click it again it loads twice, then three times etc. On some point
website becomes inoperative and must reload it.
I know that I probably shouldn't use so many load scripts, but
i looked through tons of jquery materials searching how to do it
otherwise but with no success.
Could you please help me?
ps. sorry for my english