Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="text" value="test@gmail.com" class="form-control CCContactList" />
- $(document).on('keyup', ".CCContactList", function(e) {
- e.preventDefault();
- var cemaillist = [
- {"name": "John@gmail.com", },
- {"name": "doe123@gmail.com",},
- {"name": "kevi@gmail.com", }
- ];
- $('.CCContactList').tagsinput({
- typeahead: {
- source: cemaillist.map(function(item) {
- return item.name
- }),
- afterSelect: function() {
- this.$element[0].value = '';
- },
- hint: true,
- highlight: true,
- minLength: 1,
- }
- });
- });
- var cemaillist=[ {
- "John": "John@gmail.com",},
- {"Doe": "doe123@gmail.com",},
- {"Kavin": "kevi@gmail.com",}];
- $(document).ready(function() {
- $('.form-control').keyup();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement