JSFiddle - React, Tailwind, and code Playground

by juErik

HTML

<link href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" rel="stylesheet">
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>

JavaScript

var $popup = $( "<div>Lorem Ipsum</div>" );
$( $popup ).popup({
    afteropen: function() {
        console.log( "afteropen" );
    },
    afterclose: function() {
        console.log( "afterclose" );
    },
    beforeposition: function() {
        console.log( "beforeposition" );  
    }
});

/* These do not fire until the actions actually occur */
$popup
    .on( "popupafteropen", function() {
        console.log( "popupafteropen" );
    })
    .on( "popupafterclose", function() {
        console.log( "popupafterclose" );
    })
    .on( "popupbeforeposition", function() {
        console.log( "popupbeforeposition" );
    });