Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log(element.children());
- $.each(cache.search(etext), function (i, object) {
- console.log(object.value);
- if (!element.children("option[value=" + object.value + "]").hasClass("selected") || !options.filter_selected) {
- feed.append($('<li></li>').attr('rel', object.key).text(object.value));
- counter++;
- maximum--;
- }
- });
- output from console.log:
- run one:
- []
- "this is a pretty long name" <and_a_relatively_long_mail@host.com>
- recipient@email.com
- "ttttttttttttttttttt" <testing@again.com>
- "test 1233" <testing@test.com>
- run two:
- [
- <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>
- ]
- "this is a pretty long name" <and_a_relatively_long_mail@host.com>
- recipient@email.com
- "ttttttttttttttttttt" <testing@again.com>
- "test 1233" <testing@test.com>
- 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