Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 479.6k

How to sort by selecting from dropdownlist

May 7 2023 6:40 PM

Hi Team

I have a dropdownlist of popular,latest and best buying category list. Now how to i reference these to jquery so when user if select popular the cart-container has an image of those category appears, same applies with other from the dropdownlist?

// html code

<div class="dropdown ml-4">
                                <button class="btn border dropdown-toggle" type="button" id="triggerId" data-toggle="dropdown" aria-haspopup="true"
                                        aria-expanded="false">
                                            Sort by
                                        </button>
                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="triggerId">
                                    <a class="dropdown-item" ref="#">Latest</a>
                                    <a class="dropdown-item" ref="#">Popularity</a>
                                    <a class="dropdown-item" ref="#">Best Rating</a>
                                </div>
                            </div>

 


Answers (1)