Hi there I am using the following script to load external pages inside a dialog window. The code is working and it opens the external htmls, but my problem is that it loads them all once the index.html page is loaded.
Here is my code: $(document).ready(function() { $('#Retailers li ul li a').each(function() { var $link = $(this); var $dialog = $('<div id="dialog"></div>') .load($link.attr('href')) .dialog ({ autoOpen: false, resizable: false, modal: true, position: ['center',80], overlay: { backgroundColor: '#000', opacity: 0.8 }, height:444, width: 900, closeOnEscape: true, title: $link.attr('title'), }); $link.click(function() { $dialog.dialog('open'); return false; }); }); }); What do I mean by it loads them all. In all my external htmls I have a jquery sorting table that depending on the file calls a CSV file which is then loaded into the tables. You can check an example of my external page here: http://www.katsoomi.de/clients/theone/landing/it.html So basically when I open my index.html page it will somehow automatically load all external html files and their CSV files. Do you have any ideas how I can make it when I click my link not to load all the htmls of the other links too. I think my mistake is in the beginngin of the code: $(document).ready(function() { $('#Retailers li ul li a').each(function() { where for the links #Retailers li ul li a, I use this .each? There is definately something wrong with that code, because when I try to open the page with IE i receive an error on line 136, which is the middle one from these lines: title: $link.attr ('title'), }); $link.click(function() { I will appreciate any help! Thank you very much in advance!