Jump to content

Position of sort by in mobile version of site


Recommended Posts

Hello community, please can you help me ? 

I have an issue with positioning my "sort by" in my page the issue is that on the mobile version of my site the sort by do not change place when i open the drop down menu.

I still didn't find a solution to deal with 

https://www.faubourg54.com/fr/309-astro-love-

Capture d’écran 2022-11-21 à 11.26.33.png

Capture d’écran 2022-11-21 à 11.25.59.png

Capture d’écran 2022-11-21 à 11.25.43.png

Edited by Soheib
visibility (see edit history)
Link to comment
Share on other sites

Add this javascript code to your header.

 

const mobile_menu = document.querySelector("#toggle_menu")

const sort = document.querySelector("#js-product-list-top > div.products-sort")

mobile_menu.addEventListener("click" , () => {
    if(mobile_menu.classList.contains("active")){
        sort.style.transform = "translateY(750px)"
    }else {
        sort.style.transform = "translateY(0vh)"}
})

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...