Skip to content

Instantly share code, notes, and snippets.

@boo1ean
Created December 10, 2012 15:04
Show Gist options
  • Save boo1ean/4251092 to your computer and use it in GitHub Desktop.
Save boo1ean/4251092 to your computer and use it in GitHub Desktop.
this is how you should clear stuff
function clearOtherModContent(mod){
$("#spdashContainer").html("");
if(mod =="spWorkPlaces"){
for(var i=0;i<=5;i++){
$("#bizajxHome"+i).html("");
$("#adminajxHome"+i).html("");
}
for(var i=0;i<=5;i++){
$("#schajxHome"+i).html("");
$("#adminajxHome"+i).html("");
}
for(var i=0;i<=9;i++){
$("#msgajxHome"+i).html("");
}
for(var i=0;i<=6;i++){
$("#contactsajxHome"+i).html("");
}
}
if(mod =="business"){
for(var i=0;i<=5;i++){
$("#schajxHome"+i).html("");
$("#adminajxHome"+i).html("");
}
for(var i=0;i<=9;i++){
$("#msgajxHome"+i).html("");
}
for(var i=0;i<=6;i++){
$("#contactsajxHome"+i).html("");
}
$("#workajxHome").html("");
}
else if(mod =="school"){
for(var i=0;i<=5;i++){
$("#bizajxHome"+i).html("");
$("#adminajxHome"+i).html("");
}
for(var i=0;i<=9;i++){
$("#msgajxHome"+i).html("");
}
for(var i=0;i<=6;i++){
$("#contactsajxHome"+i).html("");
}
$("#workajxHome").html("");
}
else if(mod =="contacts"){
for(var i=0;i<=5;i++){
$("#bizajxHome"+i).html("");
$("#schajxHome"+i).html("");
$("#adminajxHome"+i).html("");
}
for(var i=0;i<=9;i++){
$("#msgajxHome"+i).html("");
}
$("#workajxHome").html("");
}
else if(mod == "messages") {
for(var i=0;i<=5;i++){
$("#bizajxHome"+i).html("");
$("#schajxHome"+i).html("");
$("#adminajxHome"+i).html("");
}
for(var i=0;i<=9;i++){
$("#msgajxHome"+i).html("");
}
for(var i=0;i<=6;i++){
$("#contactsajxHome"+i).html("");
}
$("#workajxHome").html("");
}else if(mod =="admin"){
for(var i=0; i<=5; i++){
$("#contactsajxHome"+i).html("");
$("#msgajxHome"+i).html("");
$("#schajxHome"+i).html("");
$("#bizajxHome"+i).html("");
}
}
$("#workajxHome").html("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment