';
} else if (cont == 1)
solutionsHtml += '
';
if (!file_exists(image))
image = "https://via.placeholder.com/600x320.png/002856/ffffff?text=460x228px";
solutionsHtml +=
'
' +
'
' +
'
' +
'' +
'
' +
'
' + name + '
' +
'
' + description + '
' +
'
' +
'
' +
'
';
cont++;
}
solutionsHtml += '
';
} else
solutionsHtml = '
There are currently no solutions available . Please check back soon.
';
//console.log(solutionsHtml);
document.getElementById(idContainer).innerHTML = solutionsHtml;
});
// Fix height elements start
document.addEventListener("DOMContentLoaded", function (event) {
window.onresize = function () {
if ($(window).width() > 500) {
fixHeightByRow('p');
fixHeightByRow('h1');
}
};
});
}
function fixHeight(elem) {
var maxHeight = 0;
$(elem).css('height', 'auto');
$(elem).each(function () {
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
});
$(elem).height(maxHeight);
}
function fixHeightByRow(htmlSelector) {
$(".rowSolutions").each(function (index) {
noRow = $(this).attr("noRow");
fixHeight(".noRow" + noRow + " " + htmlSelector);
});
}
function file_exists(filename) {
var http = new XMLHttpRequest();
http.open('HEAD', filename, false);
http.send();
return http.status != 404;
}
if (document.readyState !== 'loading') {
location.reload();
console.log('The page was reloaded');
}
loadSolutionsElements('solutions_container', 'UK');