Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-16-2012, 07:08 PM   PM User | #1
Bobafart
Regular Coder

 
Join Date: Dec 2006
Posts: 416
Thanks: 168
Thanked 1 Time in 1 Post
Bobafart is on a distinguished road
Jquery .click not working - help plesae

I am making a messaging system and trying to use jquery to popup a reply box textarea.

Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>


...
<input type="button" name="replyButton" value="reply" class="button" />
	<div id="showReply" style="display: none;">
		<textarea name="pmReply"></textarea>
		<input type="button" name="submitButton" value="send" class="button" /> <input type="button" name="cancelButton" value="cancel" class="button" />
	</div>
	<script>
		$("#replyButton").click(function () {
		alert("test");
		$("#showReply").show("fast");
		});
		$("#cancelButton").click(function () {
		$("#showReply").hide("fast");
		});
    </script>
	</form>
I am using jQuery

but when I click my reply button, nothing happens... advice please?
Bobafart is offline   Reply With Quote
Old 02-16-2012, 07:10 PM   PM User | #2
Bobafart
Regular Coder

 
Join Date: Dec 2006
Posts: 416
Thanks: 168
Thanked 1 Time in 1 Post
Bobafart is on a distinguished road
darn, i see my mistake

"name" should be "id"
Bobafart is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:21 AM.


Advertisement
Log in to turn off these ads.