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

Mayur Pande
PLUS
Mayur Pande
Courses Plus Student 11,711 Points

I cannot get jquery plugin to work

I have added this mix it up jquery plugin to my code. However it does not seem to be showing the full portfolio that it is going to filter. It shows the controls, but not the items that it is going to mix up. I have got the plugin from here and I took the code from the code example on there from code pen (in order to see it working within my code) which can be seen here and here is a link to my site

Any suggestions on what I am doing wrong?

Many Thanks

rydavim
rydavim
18,813 Points

You'll need to provide a workspace snapshot instead of a direct link. You can generate a snapshot link using the camera icon in the top right of the workspace.

Mayur Pande
Mayur Pande
Courses Plus Student 11,711 Points

rydavim Hi thanks for the reply, will use this snapshot from now on. Normally I linked direct to the site. Here is the snapshot link

1 Answer

rydavim
rydavim
18,813 Points

It looks like there are just a couple of minor problems.

MixItUp seems to require a more recent version of jQuery. Try using the following instead.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

When linking your MixItUp script in your html, you've linked to js/jquery.mixitup.min.js. However, in your file structure you only have the un-minified js/jquery.mixitup.js version. You'll need to either link to the normal version, or add the minified file.

The third issue is a little bit more complicated. You have a section with a showreel element. I'm not sure what this is for, since it seems to be empty at the moment. If you need this element, you'll have to re-position it or the plugin frame, because they're currently overlapping each other. This causes the buttons of the plugin to appear as though they're not working.

Hopefully that gets you up and running, but please let me know if you have any other questions. Happy coding! :)

Mayur Pande
Mayur Pande
Courses Plus Student 11,711 Points

Thank you so much, this works.

With regard to the third issue I want the showreel element section to be above the plugin. But for now have just taken it out. I will play around with the positioning to sort this out.

I have one more question regarding plugins, as I was following along from the instructions from the docs for the plugin they had the old version of jquery being used. Is it normal practice to just use the latest version?

Once again many thanks.

rydavim
rydavim
18,813 Points

I actually can't find anything on their page that specifies which jquery version to use with the current version. You are correct that the docs link to jquery 1.11.0, which doesn't seem to work with this plugin anymore. I know that on the codepen, it's using jquery 2.1.3. So when I couldn't get it working, I tried updating the jquery version.

Let me know if you have any trouble getting it to play nicely with your showreel, I'd be happy to help. :)