+ 1
Suggestive Search Box [SOLVED]
I want to return results that contain the letters in my search box / exclude results that weren't returned. I've been successful to a certain degree using the :contains function but i'm not happy . how can I return/convert the ':contains' result object as a list of strings or valid span elements (by valid i mean that i can use methods on the object like '.text()' ) https://code.sololearn.com/WG4e3B6yFX8j/?ref=app
5 Respuestas
0
though i still dont know why the last two methods didn't work, i found a solution using this instead:
$.each($(buff), function(index, value){
console.log(index + ": " + value.innerHTML );
});
+ 1
May I ask why HTML datalist is not considered as an option?
https://www.w3schools.com/tags/tag_datalist.asp
+ 1
Ipang | it's very close, but i'd like to make multiple selections before submitting
eg: Ford, Mercedes Benz, Mitsubishi, etc
then making it so that the spans preserve their selected state, like by adding a "selected" class, then submitting all selected classes
also I'm inclined to having the nodes/options close by to click and move along quickly
+ 1
I'm not too familiar with jQuery, so I used plain JS instead : )
https://code.sololearn.com/WixUKQ8bg5R9/?ref=app
+ 1
Ipang | this is brilliant . it's a little too verbose for my liking, but a great alternative . 'ppreciate it . 🤝🙂