I am new to stackoverflow.
I am using jQuery for an application. Because of some reasons the onclick submit is not working to change the color of the submit button.
Here's a minimal demonstration of my problem.
$(document).ready(function() {
$("input[type='submit']").onClick(function(){
$(this).css('background-color','red');
});
});
.blue{
background-color: blue;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form>
<input type="submit" value="submit" class="blue">
</form>