jQuery Plugin For Email Address Management - Multiple Emails

File Size: 7.25 KB
Views Total: 29423
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin For Email Address Management - Multiple Emails

A jQuery plugin designed for Email related apps that allow the visitor to add/remove multiple comma-separated email addresses in a single text field. With a basic Email address validation functionality using regular expressions.

How to use it:

1. Include jQuery library and the jQuery Multiple Emails plugin's JS & CSS in the document.

<link rel="stylesheet" href="multiple-emails.css">
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="multiple-emails.js"></script>

2. Create a regular text field to accept Email addresses.

<input type="text" id="demo" name="email" value="["[email protected]","[email protected]"]">

3. Call the function to active the plugin. 

$('#demo').multiple_emails();

4. Output the Email addresses your users input to a given container with an unique ID 'current_emails'.

$('#current_emails').text($('#demo').val());

$('#demo').change( function(){
  $('#current_emails').text($(this).val());
});

Change logs:

2015-10-17

  • Fixed empty email console error on jquery illegal selector

2015-05-31

  • Remove double quotes in pasted email
  • Update multiple-emails.css

2015-03-01

  • fixed: Removing custom added email causes full list to disappear

2015-02-03

  • Keyup is now bound with 'on', blur event added

This awesome jQuery plugin is developed by pierresh. For more Advanced Usages, please check the demo page or visit the official website.