Reputation: 51100
This is driving me nuts ....
I have written a function
function seraliseQuery(){
for(var i=1; i<=variables;i++){
alert(queryPreds[i]+" - "+queryObjs[i]);
}
}
I just want to be able to call it from my other function
$(".object").click( function() {
// code removed
seraliseQuery();
});
The error I get is "the function serialiseQuery() is undefined".
Everything is within
$(document).ready( function() {
// code goes here
}
Upvotes: 0
Views: 444
Reputation: 7220
You just spelled it wrong. Rename the function "serialiseQuery".
Upvotes: 5