You are using an ID to target in jQuery. I’m guessing that you have multiple html elements with the same ID (#carousel, #slider). ID attribute values must be unique on a page. I would try to use a classes instead of IDs when using multiples on the same page.