Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. $("#project").autocomplete({
  2. minLength: 0,
  3. source: function (request, response) {
  4. //In success of ajax call i fill request(projects)
  5. response(projects);
  6. },
  7. open: function (event, ui) {
  8. var len = $('.ui-autocomplete > li').length;
  9. //I can access projects here but i need filtered data list coming from server which is passed to response callback
  10. $('.ui-autocomplete > li').css("background-color", "yellow");
  11.  
  12. for (var i = 0; i < len; i++) {
  13. // Here i use indexof('+') on each list item's label text and apply css but how to get the list here ??
  14. }
  15.  
  16. $('#count').html('Founded ' + len + ' results');
  17. }
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement