12.09.2016, 15:32
(This post was last modified: 12.09.2016, 15:48 by Erwin van der Zwart.)
Hi Buuuudzik,
Try this:
BR,
Erwin van der Zwart
Try this:
Code:
$(function(){
var openwidget = false;
function openWidget(){
if (currentPlanId == 4){
if (openwidget == false){
openwidget = true;
// Open widget
$("#widget-5").removeClass("hide");
// Position widget (absolute positioned)
document.getElementById("widget-5").style.top = "150px";
document.getElementById("widget-5").style.left = "150px";
document.getElementById("widget-5").style.width = "1024px";
document.getElementById("widget-5").style.height = "600px";
}
} else {
// Condition to hide widget
$("#widget-5").addClass("hide");
openwidget = false;
}
}
// Initial execution if needed
openWidget();
// Add event listener to control elements only for checking on each user input
$('.item-control').on( "click", function() {
openWidget();
});
});
BR,
Erwin van der Zwart