Submit button not working

When putting the following code into a page, none of the site’s submit buttons work, except for the ones with class=“submit”. How can I fix that?

$(function() {
	$('.submit').click(function() {
	var postID = $(this).attr('rel');
	var comment = $('#com_comment'+postID).val();
	var dataString = 'com_comment=' + comment + '&postID=' + postID;
	if(comment=='') {
		alert('Please enter a comment');
	} else {
		$('#flash'+postID).fadeIn(400).html('<img src="/images/ajax-loader.gif" align="absmiddle">&nbsp;<span class="loading">Loading Comment...</span>');
			type: 'POST',
			url: '/scripts/comments_ajax.php',
			data: dataString,
			cache: false,
			success: function(html){
	return false;

Surely you can figure this one out…

if you look at the second line, you see that the entirety of the code is applied to ‘.submit’ - i.e. elements with the class “submit”. If you want all input elements of type submit to have this applied to them, just replace the .submit with input[type=submit].

Hi, Could you post HTML also… it would be nice, and I see that you are using my example from previous post…

That was my first thought. However, all of the buttons on the site don’t have the .submit class applied to them, they have a .button class. Yet, when this script is in a global .js file, none of the buttons on the site work.