I am quite new to javacript and I am trying to add a numerical counter as a loop to the below function to save me typing it out 8 times!
The Function needs to be called loadPopup1 - loadPopup8 and the #toPopup div needs to be toPopup1 - toPopup8.
Here's my code:
function loadPopup() {
if(popupStatus == 0) { // if value is 0, show popup
closeloading(); // fadeout loading
$("#toPopup").fadeIn(0500); // fadein popup div
$("#backgroundPopup").css("opacity", "0.7"); // css opacity, supports IE7, IE8
$("#backgroundPopup").fadeIn(0001);
popupStatus = 1; // and set value to 1
}
}
Many thanks for your help!
Pete