How to ATTACH A LINK TO LIST ELEMENT of Search Bar ( input element , type ="tex" ) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to ATTACH A LINK TO LIST ELEMENT of Search Bar ( input element , type ="tex" )

Working on product page, To search a product, and when click on it , redirect to product page, I created product list For example- dryFruits = ["raisin" , "nut", "cashews"] Seeds = [ "flax" , "chia seeds" , "pumpkin seed" ] On searching , according to search criteria, the Product will appear according to search initial as in <li> Product Name </li> (below search box,) But how to attach a specific link of "dryfruit page". Or "seed page" if product belong one of them.

25th Feb 2021, 11:14 AM
ASHISH PANDEY
ASHISH PANDEY - avatar
3 Answers
+ 1
Use <a href="#dryfruits">dryfruits</a> <a href="#seed">seed</a> For external pages <a href="past_dryfruits_page_link">dryfruits</a> <a href="past_seed_page_link">seed</a>
25th Feb 2021, 1:16 PM
SAN
SAN - avatar
0
That's just a anchor to attach a link, , I have two pages, SEED and DRYFRUITS, I have attach a link based on product got clicked
25th Feb 2021, 12:02 PM
ASHISH PANDEY
ASHISH PANDEY - avatar
0
Actually I used .map method to sort out the element and then attach the <a> element, Thanks for everyone
25th Feb 2021, 3:26 PM
ASHISH PANDEY
ASHISH PANDEY - avatar