Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Jason Veiga
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jason Veiga
Front End Web Development Techdegree Graduate 12,347 Points

I am having issues with JavaScript to create a "search" for Project 5 (Interactive Photo Gallery)

I copied and pasted the standard "searchFilter.js" provided to us for the project. I also added the "<script src="js/searchFilter.js"></script>" to HTML.

I must have messed something up; I was wondering if someone can help me, please?

https://github.com/jasonveiga401/interactive_photo_gallery/tree/main/interactive_photo_gallery

1 Answer

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hey Jason Veiga 👋

For any questions regarding the Techdegree projects I highly recommend reaching out to the dedicated Slack Channels for the Techdegree you're enrolled in. There you'll find fellow students and staff in a real-time chat environment to help out with any issues or questions you may come across during your coding journey.

If you have not yet joined Slack you can find an invite on the Join Your Slack Community page.

As for your question, it looks like the order of your script tags is off. You'll always want to load third-party code before your custom JavaScript file. For this project, it means that you'll want to move the script tags for the baguetteBox and searchFilter files before your own app.js file. Once those are switched around your search functionality should start working as expected 🙂

Hope this helps 😄