JSFiddle - React, Tailwind, and code Playground

by marianc

JavaScript

var iframe = $("<iframe>", {
    src:'https://bootstrap-datepicker.readthedocs.org/en/latest/',
    style: "position:absolute; left:-100%",
    load: function () {
        var that = this;
        $(this).animate({
            left: 0
        }, 500);
        $('iframe').not(this).animate({
            left: '-100%'
        }, 500, function () {
            $('iframe').not(that).remove();
        });
    }
});
$('body').append(iframe);