Stack Snacks

Share this post

Replace Jquery with Cash

www.stack-snacks.com

Replace Jquery with Cash

John Siwicki
Oct 21, 2021
Share this post

Replace Jquery with Cash

www.stack-snacks.com

GitHub - fabiospampinato/cash: An absurdly small jQuery alternative for modern browsers.

An absurdly small jQuery alternative for modern browsers. - GitHub - fabiospampinato/cash: An absurdly small jQuery alternative for modern browsers.
GitHubfabiospampinato

Cash is a tiny little plugin that uses a lot of Jquery syntax and allows you to continue to write your JS with a very comfortable and familiar syntax.

<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/8.1.0/cash.min.js"></script>
<script>
  $(function () {
    $('html').addClass ( 'dom-loaded' );
    $('<footer>Appended with Cash</footer>').appendTo ( document.body );
  });
</script>

If you are doing some small little dom manipulations why not reach for Cash.

If you are watching your KB as you optimize for Core Web Vitals, Cash is something that might be worth reaching for depending on how you use Jquery. According to their Readme, the total file size Minified & Gzipped is only 6kb. The default install doesn't do everything Jquery full will do so make sure this works for your projects before you make a move.

Share this post

Replace Jquery with Cash

www.stack-snacks.com
Comments
TopNew

No posts

Ready for more?

© 2023 John Siwicki
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing