Advertisement
punkwasp

Implementing a GIF toggle in HTML

Aug 15th, 2023
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.84 KB | Source Code | 0 0
  1. <!-- This is the portion of code you'll want to copy in between your opening and closing head tags to implement a working GIF toggle on your website, once you've done that, just add the class "freezeframe" to any GIF images or to any div containers that hold only GIF images -->
  2. <link rel="stylesheet" href="https://unpkg.com/freezeframe@3.0.10/build/css/freezeframe_styles.min.css">
  3. <style>.ff-container{display:inline-flex;}</style>
  4. <script src="https://unpkg.com/freezeframe@3.0.10/build/js/freezeframe.pkgd.min.js"></script>
  5. <script>
  6.     $(function() {
  7.         third = new freezeframe('.freezeframe').capture().setup();
  8.         $('.play').click(function(e) {
  9.             e.preventDefault();
  10.             third.trigger();
  11.         });
  12.         $('.stop').click(function(e) {
  13.             e.preventDefault();
  14.             third.release();
  15.         });
  16.     })
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement