mtkopone / zelect

From <select> to something more 2012
Do What The F*ck You Want To Public License
395 stars 42 forks source link

ajax call request #26

Open gstlouisgit opened 5 years ago

gstlouisgit commented 5 years ago

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&nbsp;(<?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.")
}
mtkopone commented 5 years ago

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.