Re: A stunning theme required
Posted: Mon Jul 17, 2017 2:40 pm
Far from simple code tho.. that's some complicated script to me! I feel tiny all the sudden..
integration and scripts forums
https://www.axew3.com/w3/forums/
Code: Select all
<script type="text/javascript">
// w3all resizer
function w3all_resizer() {
// x ul.topiclist.topics
$('ul.topiclist.topics li.row dl.row-item').each(function () {
// cross nodes fix check
var hb1 = ($(this.childNodes[1].childNodes[3]).height());
var hb2 = ($(this.childNodes[1].childNodes[1]).height());
var hb3 = ($(this.childNodes[1].childNodes[1].childNodes[11]).height());
var hbr = Math.max(hb1, hb2);
if (hbr < 55){ hbr = 55; } // the needed min height for form list rows
if(hbr > 55 && hb3 !== null){ hbr += hb3+6; } // wow, the needed min height, more the pagination row ... if there is one on this row
$(this,'ul.topiclist.topics li.row dl').children().css({
height: hbr + 'px',
'padding':'0px'
});
});
// x ul.topiclist.forums
$('ul.topiclist.forums li.row dl.row-item').each(function () {
// cross nodes fix check
var hb1 = ($(this.childNodes[1].childNodes[3]).height());
var hb2 = ($(this.childNodes[1].childNodes[1]).height());
var hbr = Math.max(hb1, hb2);
if (hbr < 55){ hbr = 55; } // the needed min height for form list rows
$(this,'ul.topiclist.forums li.row dl').children().css({
height: hbr + 'px',
'padding':'0px'
});
});
}
$( window ).load(function() {
$('ul.topiclist.forums li.row dl.row-item').each(function () {
// $(this.childNodes[1]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"text-align:center;margin:0px;padding:0px;vertical-align:middle\"></td></tr></tbody></table>" );
$(this.childNodes[3]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"text-align:center;margin:0px;padding:0px;vertical-align:middle\"></td></tr></tbody></table>" );
$(this.childNodes[3,5]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"text-align:center;margin:0px;padding:0px;vertical-align:middle\"></td></tr></tbody></table>" );
$(this.childNodes[3,5,7]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"margin:0px;padding-left:6px;vertical-align:middle\"></td></tr></tbody></table>" );
});
$('ul.topiclist.topics li.row dl.row-item').each(function () {
$(this.childNodes[3]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"text-align:center;margin:0px;padding:0px;vertical-align:middle\"></td></tr></tbody></table>" );
$(this.childNodes[3,5]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"text-align:center;margin:0px;padding:0px;vertical-align:middle\"></td></tr></tbody></table>" );
$(this.childNodes[3,5,7]).wrapInner( "<table style=\"margin:0px;padding:0px;border-collapse:collapse;height:100%;width:100%\"><tbody><tr><td style=\"margin:0px;padding-left:6px;vertical-align:middle\"></td></tr></tbody></table>" );
});
w3all_resizer();
});
(function() {
window.addEventListener("resize", resizeThrottler, false);
var resizeTimeout;
function resizeThrottler() {
// ignore resize events as long as an actualResizeHandler execution is in the queue
if ( !resizeTimeout ) {
resizeTimeout = setTimeout(function() {
resizeTimeout = null;
w3actualResizeHandler();
// The actualResizeHandler will execute at a rate of 45fps
}, 198);
}
}
function w3actualResizeHandler() {
// handle the resize event
w3all_resizer();
}
}());
</script>