14.01.2021, 07:38
A short delay works for me, try this:
Code:
$(function() {
function setframe(url) {
var frame = $('.frame iframe').attr('src', 'about:blank');
setTimeout(function() {
frame.attr('src', url);
}, 10);
}
$('.btn-1').off('vclick').on('vclick', function() {
setframe('http://192.168.1.16/scada-vis/#1');
});
$('.btn-2').off('vclick').on('vclick', function() {
setframe('http://192.168.1.16/scada-vis/#2');
});
});