zelect
zelect copied to clipboard
ajax call request
I have tried working with the example from here https://github.com/mtkopone/zelect#ajax-loader-example
And nothing seems to work. There are javascript error from the start. Is this still maintained? Are there other clearer example for doing an ajax call?
I have tried only bare code to see like this and even the placeholder does not show even if it says there are no errors
placeholder: 'codes (<?php echo count($codes['products']); ?>)',
throttle: 150,
loader: function loader(term, page, callback) {
console.log('loader');
},
renderItem: function renderer(item, term) {
return console.log('renderer');
},
noResults: function noResultser(term) {
return console.log('no result');
//$('<span>').addClass('no-results').text(term + "didn't hit anything.")
}
Hi. I haven't maintained this repo in 6 years, so it's very probably not compatible with current jQuery versions. I also don't have time right now to get into this, sorry.
But looking at the forks, looks like there are some that have been updated to work.