Guest User

Untitled

a guest
Oct 20th, 2017
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. console.log(element.children());
  2. $.each(cache.search(etext), function (i, object) {
  3. console.log(object.value);
  4. if (!element.children("option[value=" + object.value + "]").hasClass("selected") || !options.filter_selected) {
  5. feed.append($('<li></li>').attr('rel', object.key).text(object.value));
  6. counter++;
  7. maximum--;
  8. }
  9. });
  10.  
  11.  
  12. output from console.log:
  13.  
  14. run one:
  15.  
  16. []
  17. "this is a pretty long name" <and_a_relatively_long_mail@host.com>
  18. recipient@email.com
  19. "ttttttttttttttttttt" <testing@again.com>
  20. "test 1233" <testing@test.com>
  21.  
  22. run two:
  23.  
  24.  
  25. [
  26. <option value=​""​this is a pretty long name"​ <​and_a_relatively_long_mail@host.com>​" id=​"opt_FNfAq9fQ5GWmtUNsJ0t81wOobgKC0pyM" selected=​"selected" class=​"selected">​this is a prett...​</option>​
  27. ]
  28.  
  29.  
  30. "this is a pretty long name" <and_a_relatively_long_mail@host.com>
  31. recipient@email.com
  32. "ttttttttttttttttttt" <testing@again.com>
  33. "test 1233" <testing@test.com>
  34.  
  35.  
  36. It should be adding those 4 into the drop down box but it doesn't... the above code is detecting false positives in the option value I believe.
Add Comment
Please, Sign In to add comment