I’m getting a list of notes from the database and displaying them to the view, if the note is less than 15 minutes old then I am displaying a edit button allowing users to inline edit the note and save the new information. I have this part working fully. I’m now trying to attach a timer to the notes that are less than 15 minutes old and hide the button when the timer is up. N.B. The user can edit multiple notes as long as they’re < 15 minutes old.
How would I go about doing this, as I’m not too familiar with jQuery and Javascript?
Thanks for any replies, as I’m quite new to this forum stuff I wan’t sure if you needed code or not to answer the question. So if anyone wants to look at it I’ll put it up.
I’m getting a list of notes from the database and displaying them to the
Share
I would add an .editable class to notes that are still editable and remove it when no longer.
You could retain the time for the note in a data-time=”1359999066″ attribute (assuming it’s unix timestamp). Let me know if you need further help with the code I implied.