How to populate server called data to materialized css chip autocomplete

268
May 01, 2017, at 06:20 AM

I am trying to populate materialized css chip autocomplete data by using a server call. I did tried many ways to make it, but not able to do so. Sample that i have tried to make it work as below:

var storeData;
$(document).on('keyup', '#inputid', function() {
    storeData = //do server call and return data;
});
$('.chips-autocomplete').material_chip(
{autocompleteOptions : storeData}
});

Like above code i tried many different combinations. need help to make the server call and populate dynamic data as chip.

READ ALSO
How to make a SideNav draggable in Materialize.css?

How to make a SideNav draggable in Materialize.css?

By default, the SideNav from Materialize supports dragging gestures on the screen to slide out the navHowever, these gestures only work outside the nav

369
Populating form with data using ajax response

Populating form with data using ajax response

I'm currently having a problem passing the values into the edit form using an ajax response, if I just respond by html and render the form it gets the email value passed inBut I'm having no luck trying to do this via ajax

177
Javascript wont load on phone [on hold]

Javascript wont load on phone [on hold]

So i am making a responsive website and i just finished medium-small and went on mobile but as i was testing my website on my phone, the javascript connected content didn't interact

162