javascript event.target throwing errors(but it works)
<p>Long story short, im making a small website using ajax but its more for mobiles.</p>

<p>ive hijacked a few links and while testing on firebug, i get this error when clicking
links</p>

<pre><code>TypeError: e.target is undefined
[Break On This Error]   

var myurl = e.target.href;
</code></pre>

<p>Now the thing is that although i get this error, it does work when i test it on a regular desktop and when i put on a mobile(ios) it also works and loads the AJAX content.</p>

<p>Reason i want to fix it is because...well aside from having an error, im having another small issue and im not sure if its because of this so, trying to fix one by one.</p>

<p>Heere are the two functions ive created to hijack the mobile sites links.</p>

<p>javascript:</p>

<pre><code>//~~~~~~~~~~~~~~~~~~~~~~~~~~~functions for mobile index load AND hijacking app      

function loadPage(url){
        if( url == undefined){
            $('#contentHere').load('index.html #content', hijackLinks);
                window.location.hash = mainHash;
        } else {
            $('#contentHere').load(url + '#content', hijackLinks ); 
        }
    }


    function hijackLinks(e){
        var myurl = e.target.href;
        e.preventDefault();
        loadPage(myurl);
        mainHash = window.location.hash = $(this).attr("href");
        console.log(mainHash);

    }
</code></pre>

<p>Anyone can help me with this? how would i fix this?</p>

<p>Thanks in advanced.</p>
