var_dump() for Javascript

PHP, for example, has var_dump() and print_r() to facilitate quick variable dumps to log files, etc. For Javascript, one can use console.log() in combination with JSON.stringify() to achieve something similar.   console.log( JSON.stringify(object) ); It’s also possible to “pretty-print” the output like so:   console.log( JSON.stringify(object, null, 2) ); For more information …

More

Lightbox for Bootstrap 4 and jQuery

Lightbox (or “image preview”) functionality for Bootstrap 4 without additional libraries (apart from jQuery). Written by Joaquim Homrighausen <joho@webbplatsen.se> 30-May-2019 TEAMYUJO Do as you wish with this 🙂 This is the Javascript/jQuery code for the Bootstrap 4 modal. You don’t have to use jQuery to accomplish this obviously. $(document).ready(function($) { …

More