Topic: Is there have any method to add tag by js after material_chip initialized
Melody Song
asked 8 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
Add comment
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Open
Specification of the issue
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No