Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post

    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?

  • #2
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post
    darn, i see my mistake

    "name" should be "id"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •