tags:

views:

28

answers:

1

Possible Duplicate:
Double click needed in firefox (JQUERY)

I was advised to used this because i was having a problem, a link worked in FireFox ONLY when clicked the second time. This is to display an external html in a div called leftColumn.

$(function(){
  $('#ulWithAllTheLinks').delegate('li a', 'click', function(e){
    e.preventDefault;
    $('#leftColumn').load(this.href);
  });
});

My question is how can I make the link display the html in the leftColumn code as the function says instead of opening it in a NEW window?

<ul id="one">
  <li><a  href="content.html">First Link</a></li>
</ul>

yet i don't know how to link this to the function.

A: 

On line 2, it looks like you're missing the parenthesis to actually make the method call. Change to:

e.preventDefault();

Without the (), you're accessing preventDefault as if it were a variable (more specifically, you're getting a reference to the function).

josh3736