I am running this code which I want the submit button to display only when all the fields are not empty but it's not working.
<form id="my_form">
<input type="text" id="title" name="title" class="title" placeholder="TITLE" />
<textarea name="comment" id="comment" class="textarea"></textarea>
<input type="text" id="tags" name="tags" class="text" placeholder="TAGS" />
<span id="advance"></span>
</form>
<script src="js/jscript.js"></script>
<script>
$(document).ready(function() {
if (($("#comment").val() !== "") && ($("#title").val() !== "") && ($("#tags").val() !== "")) {
$('#advance').html("<input type='submit' name='submit' id='submit' class='upload' value='ADVANCE' />");
}
});
</script>