e.preventdefault(); not working

I’m having real trouble getting e.preventDefault(); to work. Here is my code Could someone explain what I’m doing wrong, I can see the load function work but then the page redirects to the clicked link which I need to prevent. I have also tried moving e.preventDefault(); to the top of the function, to no avail.e.preventdefault(); … Read more

Javascript : array.length returns undefined

I have a set of data that is being passed on by the PHP’s json_encode function. I’m using the jQuery getJSON function to decode it: The output looks like this in the console: I can access each array by using data[1], data[2] etc, but to make it easier I thought of looping thought it so … Read more