View Full Version : JQ mouseover keeps firing AJAX GET -- how to make it fire once?

11-29-2009, 08:39 PM
I put my mouse over the element and my JQ .mouseover keeps firing loading my AJAX script over and over again like a crack addict on LSD. How do you make it fire once?

// get input string from the input field
var inputString = $('#swapImageValue').val();
//alert( $('#swapImageValue').val() );
// post data to our php processing page
type: "GET",
url: "ajax_loadankleligaments.php",
data: "mysearchString="+inputString,
success: function(data){
if(data.length >0) {

any help?

11-30-2009, 05:02 AM
Check the documentation for mouseover (http://docs.jquery.com/Events/mouseover).

Mouseover fires when the pointer moves into or out from child element, while mouseenter does't.

You might rather be interested in the hover() event (http://docs.jquery.com/Events/hover).