Docs

Everything You Need to Know

jQuery

Intro

Truck Chassis

You can use jQuery with Truck. Just load it first. Truck will then use jQuery instead of its default DOM selector engine. You can also build Truck in a number of ways to which make it easier to use with jQuery. Personally, we don't think you should bother using jQuery with Truck. There simply isn't a good reason to do so. Including jQuery in every Web project is like a drug addiction. Truck can build powerful apps without jQuery. It provides great layouts and advanced widgets that do not need jQuery. It gives you modern, ECMAScript 6 Promises and the Fetch API as an alternative to jQuery's Ajax. Yes, there are a ton of jQuery plugins out there. But none of them are fit to use on mobile devices, and none of them create a satisfactory user experience on mobile devices. jQuery plugins are great for desktop though.

OK, so if you really, really, really insist on using jQuery, here are your build options:

  1. The complete framework
  2. Just the MVC components
  3. Everyting except the selector engine

To build the whole thing, just run gulp:

gulp

If you want to build just Truck's selector engine to use it as a light and modern replacement for jQuery, run:

gulp --mvc

And to build the framework but without Truck's DOM engine because you want to use jQuery, run:

gulp --engine