Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ok ovo je html
- <div class='comments'>
- <img src='uploads/$row[userPhoto]' width='40' height='40'>
- <textarea class='commentText' id='" . $row_post["commentID"]. "' name='postText' placeholder='Write a comment...'></textarea>
- </div>
- i ovo je js
- $(.commentText).keypress(function(e) {
- var post_id= $(this).attr('id');
- if(e.which == 13) {
- alert('Button succeed!');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement