i just began a project in html and jquery and i have to compare validate a period.it means that user must enter two years and the second one should be bigger than the second one.i tried this and it doesn't work: this is my html code
<div class="form-group">
<label class="col-md-4 control-label" for="pe">Période de fréquentation </label>
<div class="col-md-2">
De <input id="pe" name="pe" type="text" placeholder="année" class="form-control input-md">
à <input id="pe2" name="pe2" type="text" placeholder="année" class="form-control input-md">
</div>
</div><br/><br/><br/><br/><br/><br/><br/>
and this one is my jquery function:
` $(document).ready(function() {
$('#pe').click(function() { {
if ($(this) > $('#pe')){
alert("veuillez corriger la periode de frequentation");
return false ;
}
else return true;
}}}`