Administrators Nathan Posted June 15, 2012 Administrators Posted June 15, 2012 I've already created a comment system in my application that does not reload the page when you submit. Now what I would like to do is similar to the Facebook comment button. When just viewing it's just the word "Comment" if you click the word then a box opens and drops down for you to enter your comment then submit. What method would I use to do this? Tutorial Link? Quote
__Darknite Posted June 15, 2012 Posted June 15, 2012 Yes, just simply have the comment box hidden inside a div. Use jquery or old school js to show it when the "comment" button is clicked. you can do all sorts of fancy animations to show the comment box. Quote
Administrators Nathan Posted June 15, 2012 Author Administrators Posted June 15, 2012 Yes, just simply have the comment box hidden inside a div. Use jquery or old school js to show it when the "comment" button is clicked. you can do all sorts of fancy animations to show the comment box. I was trying it with jQuery last night for a couple hours and just wasn't getting it to work. Have any good tutorial links? Quote
Administrators Nathan Posted June 15, 2012 Author Administrators Posted June 15, 2012 Ah figured it out, the issue that I was having is the auto page refresh. Once I turned it off it works fine. But a new problem If I turn back on the page loads correctly and works until it goes to refresh that div, after refresh the hide/show div no longer works on comments and is opened up. I need the page to auto refresh the main div it is, but also need this comment div hide/show to work. Quote
__Darknite Posted June 15, 2012 Posted June 15, 2012 could you paste the javascript code that's giving you the issue? Quote
Administrators Nathan Posted June 18, 2012 Author Administrators Posted June 18, 2012 could you paste the javascript code that's giving you the issue? I ended up getting this working. Currently it will count the number of comments and show them to you. I now need to modify further so that on click it will show the current comments and also have a spot to enter a new comment. Everything continues to get harder as I keep adding to it Quote
Marc Posted June 18, 2012 Posted June 18, 2012 I ended up getting this working. Currently it will count the number of comments and show them to you. I now need to modify further so that on click it will show the current comments and also have a spot to enter a new comment. Everything continues to get harder as I keep adding to it Bet your learnin though Quote
Administrators Nathan Posted June 19, 2012 Author Administrators Posted June 19, 2012 Bet your learnin though Yup, learning quite a bit, turns out I found a better tutorial to do what I wanted on just showing a drop down div here. Now that that's all finished I need to include a spot for inserting new comments. This seems to be a little harder since I'm grabbing the comments from an include file. Quote
Marc Posted June 19, 2012 Posted June 19, 2012 Ooo thats quite nice Might have a play with that. If your getting into it, have a search for jquery UI Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.