JSFiddle - React, Tailwind, and code Playground
by Kalu Singh Rao
JavaScript
var va, _callBackURL, _callBackArgs, jsonURL, jsonArgs, oJson = '', param1 = null, param2 = null, param3, param4, param5, eresult = null, result = null, AJAXResult = null, AJAXRes = null, gl = false, cmdQS = null, PrevCtrl = null, divCtr = false, DoNotEsc = false, selectCheckEsc = false, wid = screen.width, hei = screen.height - 50, timer, textarea = 0;
function f(urls) {
wid = screen.width;
hei = screen.height - 50;
if (urls == '' || urls.indexOf("class='drop'") > -1 || urls == "class='drop'")
{ return false; }
window.open(urls, "_blank", 'height=' + hei + ',width=' + wid + ',status=no,toolbar=no,menubar=no,location=no,titlebar=no,left=0,top=0');
return false;
}
function scrolify(tblAsJQueryObject, height) {
var oTbl = tblAsJQueryObject;
// for very large tables you can remove the four lines below
// and wrap the table with <div> in the mark-up and assign
// height and overflow property
var oTblDiv = $("<div/>");
oTblDiv.css('height', height);
oTblDiv.css('overflow', 'scroll');
oTbl.wrap(oTblDiv);
// save original width
oTbl.attr("data-item-original-width", oTbl.width());
oTbl.find('thead tr th').each(function () {
$(this).attr("data-item-original-width", $(this).width());
});
oTbl.find('tbody tr:eq(0) td').each(function () {
$(this).attr("data-item-original-width", $(this).width());
});
// clone the original table
var newTbl = oTbl.clone();
// remove table header from original table
oTbl.find('thead tr').remove();
// remove table body from new table
newTbl.find('tbody tr').remove();
oTbl.parent().parent().prepend(newTbl);
newTbl.wrap("<div/>");
// replace ORIGINAL COLUMN width
newTbl.width(newTbl.attr('data-item-original-width'));
newTbl.find('thead tr th').each(function () {
$(this).width($(this).attr("data-item-original-width"));
});
...