jasonscottphoto
Dec-24-2009, 04:51 AM
I am currently using this code to hide the category "Personal" from my Galleries page. How do I add an additional category to the code to hide multiple categories? Or, is there a better way to do this?
<!-- Hide Categories -->
function delCategory() {
re = /\/(Personal|Unlisted)$/;
var oList = YD.getElementsByClassName('miniBox', 'div', this);
for (i = 0; i < oList.length; i++) {
if (re.test(oList[i].getElementsByTagName('a')[0].href))
oList[i].parentNode.removeChild(oList[i]);
}
}
YE.onContentReady('categoriesBox', delCategory);
<!-- End Hide Categories -->
<!-- Hide Categories -->
function delCategory() {
re = /\/(Personal|Unlisted)$/;
var oList = YD.getElementsByClassName('miniBox', 'div', this);
for (i = 0; i < oList.length; i++) {
if (re.test(oList[i].getElementsByTagName('a')[0].href))
oList[i].parentNode.removeChild(oList[i]);
}
}
YE.onContentReady('categoriesBox', delCategory);
<!-- End Hide Categories -->