This basic JQUERY isn't working...Can someone see what is that I'm missing?
<apex:page controller="newOpportunityController">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" type="text/javascript">
var j$ = jQuery.noConflict();
alert('inside JQUERY');
j$("document").ready(function() {
j$("#id3").on('change',checkGender);
j$("#id3").on('click', test);
console.log('test message');
});
function checkGender(){
var gender = j$("#id3");
alert(gender.val());
if((gender.val() == 'Female'){
j$("#id4").hide();
}
else {
j$("#id4").show();
}
}
function test(){
alert('JQUERY is working');
}
</script>
<apex:pageblock>
<apex:form>
<apex:pageblocksection>
<apex:inputField id="id3" value="{!cont.gender__c}" />
<apex:inputfield id="id4" value="{!cont.Upanayanam__c}" />
</apex:pageblocksection>
</apex:form>
</apex:pageblock>
</apex:page>