Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Is there have any method to add tag by js after material_chip initialized

Melody Song free asked 7 years ago


i wanna import tag from somewhere,but i don't know how to add tag after executed the follow code
$('.chips-placeholder').material_chip({ 
placeholder: 'add tag', 
secondaryPlaceholder: 'input a tag' 
});
i try to use
function addTag(arr) { 
var tagArr = new Array(); 
arr.forEach(item => {
 tagArr.push({ tag: item }); });
$('#sites').material_chip({data: tagArr});
}
but it not work

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags