Hey, how's it goin
I'm trying to write a simple if statement with jQuery...it looks like this
if ($('#title .general').length == 0) {
function() {
$('#ubi').empty();
$('#address').empty();
$('#city').empty();
$('#region').empty();
}
}
First off, i'm getting an error in firefox that has
"syntax error"
function( ) { }
-----------^
Second, I have some elements that are to be hidden and then made visible after certain things happen on the page, but once I introduce this if statement, all elements appear visible on document ready, as if all the code after the if statement that pertains to those elements is invalidated. Err...what the if!
So I believe I need to pass in a parameter? I'm not sure what that would need to be, i'm kind of cloudy on the idea of parameters for some reason. Anyone able to point me in the right direction?
Mucho gracias.