Webpage filtering problem

On my webpage there are product pages that can be filtered by dropdown menus. I have written the code for it, and it works perfectly. I copied the code to another product page to use it the same way as before, but it is not working at all. I have changed the code according to the second product page. The code is working flawlessly on one page, and not working on other pages. What could have happened?