jQuery load function links wont work
<p>Hi I am creating am trying to create an interface for an e-commerce website as a personal project.Being a beginer in web development it seems I have stumbled in a problem that I don't understand.I am using jQuery's load function to change the content of 2 divs on click.This is my code's HTML:</p>

<pre><code>&lt;ul id="title"&gt;
                &lt;li&gt;&lt;h2 class="title"&gt;&lt;a href="" class="selected"&gt;Configureaza&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;h2 class="title"&gt;&lt;a href=""&gt;Personalizeaza&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;h2 class="title"&gt;&lt;a href=""&gt;Adonuri&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;h2 class="title"&gt;&lt;a href=""&gt;Verifica&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id="tot"&gt;
        &lt;div id="configureaza"&gt;
              &lt;div id="stuff"&gt;
                    &lt;img src="img/windows.jpg"/&gt;
                           &lt;div id="select"&gt;
                                &lt;h2&gt;Selecteaza Produsul Microsoft&lt;/h2&gt;
                                &lt;form&gt;
                                    &lt;ul&gt;
                                        &lt;li&gt;&lt;input type="checkbox" value="Windows Vista"/&gt;Windows Vista&lt;span&gt;+320 lei&lt;/span&gt;&lt;/li&gt;
                                        &lt;li&gt;&lt;input type="checkbox" value="Windows 7"/&gt;Windows 7&lt;span&gt;+440 lei&lt;/span&gt;&lt;/li&gt;
                                        &lt;li&gt;&lt;input type="checkbox" value="Microsoft Office"/&gt;Microsoft Office&lt;span&gt;+220 lei&lt;/span&gt;&lt;/li&gt;       
                                    &lt;/ul&gt;
                                &lt;/form&gt;

                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;ul id="links"&gt;
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/msvista_on.gif" title="Sistem de Operare"/&gt;&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/placadebaza.png" title="Placa de Baza"/&gt;&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/procesor.png" title="Procesor"/&gt;&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/aw_optical_on.gif" title="Unitate Optica"/&gt;&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/hd.jpg" title="Hard-Disk"/&gt;&lt;/a&gt;&lt;/li&gt; 
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/vs4.jpg" title="Rami"/&gt;&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=""&gt;&lt;img src="img/vc.jpg" title="Placa Video"/&gt;&lt;/a&gt;&lt;/li&gt;
                        &lt;/ul&gt;
                    &lt;/div&gt;

            &lt;/div&gt;
</code></pre>

<p>jQuery:</p>

<pre><code> $(document).ready(function(){
            $('img[title="Sistem de Operare"]').click(function(e){
                e.preventDefault();
                $('div#stuff').load('win.html');


            })
            $('img[title="Placa de Baza"]').click(function(e){
                 e.preventDefault();
                $('div#stuff').load('motherboard.html');

            })

            $("ul#title a").click(function(e){
                 e.preventDefault();
                var link = $(this).text();
                if(link === "Configureaza"){

                    $('div#tot').load('Configureaza.html');

                }else if(link === "Personalizeaza"){

                     $('div#tot').load('Personalizeaza.html');

                }else if(link === "Adonuri"){

                    $('div#tot').load('Addons.html');

                }else{

                     $('div#tot').load('Verifica.html');

                }
                $('ul#title a').removeClass('selected');
                $(this).addClass('selected');     

            })

        })
</code></pre>

<p>I have only posted the code for the first 2 links from ul#links because the other code is similar.Ok when I first load the page and I click for example $('img[title="Sistem de Operare"]') the load function works normaly and it loads the elements specified there.But if I click on any of the links in div#tot and then com back on the main page the other links dont work anymore and I noticed an # beinng aded on the link.How can I solve this?</p>

<p>Another problem that I don't understand is that when I try going to the folder where I have the page and open it manualy non of the links will work from the begining.But if I open them from netbeans for example they all work.What am I doing Wrong?</p>
