Am very new to JavaScript / JQuery... Am trying to create a label which is similar to the e-mail addresses that one has in their TO: text field (as input) in Hotmail.
What I am seeking is a mechanism to pass in a String name and String e-mail into a JavaScript function which will produce a label (with the person's name) along with a pencil image (for edit during mouseover) and X (delete button).
How could I create this? Is there a JQuery plug-in that I can use to make it so a text field contains this dynamic label but the end user can click on on the X (and delete it) and / or click on the pencil image and see the e-mail address and edit it?
(1) Contact Labels:
(2) Edit Contacts:
Basically, I want to pass in a name and e-mail String into a JavaScript function and come up with these labels:
(1) function createDynamicLabel(String name, String email) {}
(2) function editDynamicLabel() {}
Would this require a div tag which holds two images (can these images be clicked on)? I can't seem to envision how to create these dynamic labels using HTML/CSS/JavaScript...
Any help would be most appreciative!
Thank you for taking the time to read this.