Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. .data("autocomplete")._renderItem = function(ul, item) {
  2. var template;
  3. if (item.isActive === true) {
  4. template = "<a>" + item.label + item.desc + item.status + "</a>";
  5. } else {
  6. template = "<a >" + item.label + item.desc + "<span class='inactive'>" + item.status
  7. + "</span></a>";
  8. }
  9.  
  10. return $("<li>")
  11. .append(template) // .append("<a>" + item.label + item.desc + "</a>")
  12. .appendTo(ul);
  13. };
  14. },
  15.  
  16. .data("autocomplete")._renderItem = function (ul, item) {
  17. var template;
  18. if (item.isActive === true) {
  19. template = "<a>" + item.label + item.desc + item.status + "</a>";
  20. } else {
  21. template = "<a >" + item.label + item.desc + "<span class='inactive'>" + item.status + "</span></a>";
  22. }
  23.  
  24. return $("<li>")
  25. //missing this
  26. .data( "item.autocomplete", item )
  27. .append(template)
  28. .appendTo(ul);
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement