The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Remove redundant jQuery code

RolfRolf Member
in Help edited August 2014
Is there a way to use a jQuery build with only necessary stuff? I don't use it, don't want to use a "maybe-already-cached-cloud'-version and am now including the whole library. I don't use the modal/colorbox thing, just the basic FoxyCart-JS.

Really, FC code should be vanilla JS anyway..!
Comments
  • fc_adamfc_adam FoxyCart Team
    edited August 2014
    @Rolf,
    Is there a way to use a jQuery build with only necessary stuff? I don't use it, don't want to use a "maybe-already-cached-cloud'-version and am now including the whole library.

    Using a partial jQuery library isn't something we've tested ourselves - but as jQuery is included separately within the FoxyCart includes for your site, you're more than welcome to give that a try, replacing the file we included by default. Obviously you'll want to test that thoroughly after making the change.

    I don't use the modal/colorbox thing, just the basic FoxyCart-JS.

    Just in case you hadn't seen that you can, you can change the javascript reference to just foxycart.js instead of foxycart.colorbox.js to not include Colorbox if you don't want the modal window functionality.

    Really, FC code should be vanilla JS anyway..!

    We understand that vanilla JS is a much better option now, but we try to promise our users legacy browser compatibility as many serve customers who aren't always on the latest versions. Because of that, we believe that jQuery is a reasonable dependency.
Sign In or Register to comment.