Mohon ijin buat share
Terinspirasi dari [url=http://theftalk.com/t7772-hide-code-%28script-style%29.html][b]Hide Code (JS)[/b][/url] di TnT
Ini hanya alternatif hide box dengan menggunakan JS, apabila hide box dengan CSS tidak berfungsi
Credit :

[url=http://theftalk.com/p=xavierkym][b]xavierkym[/b][/url] for inspiration

[url=http://theftalk.com/profile.php?id=319][b]Bang Kanal[/b][/url] for permission
Ini script nya :
[quote]//HIDE CODE
function rdiv() {
var hide1=document.getElementById("[b]ID_BOX1[/b]");
hide1.parentNode.removeChild(hide1);
}
window.addEvent('domready', function () { rdiv();});[/quote]
Untuk menamabahkan box yg ingin di hide tinggal manambahkan bagian yg [b]ID_BOXnya[/b]
[quote]//HIDE CODE
function rdiv() {
var hide1=document.getElementById("[b]ID_BOX1[/b]");
hide1.parentNode.removeChild(hide1);
var hide2=document.getElementById("[b]ID_BOX2[/b]");
hide2.parentNode.removeChild(hide2);
var hide3=document.getElementById("[b]ID_BOX3[/b]");
hide3.parentNode.removeChild(hide3);
}
window.addEvent('domready', function () { rdiv();});[/quote]
Letakkan di bagian C sesuai [url=http://theftalk.com/t15339-%7BTUTORIAL%7D-Kombinasi-Addbox-%28UPDATE-08-03-08%29.html][b]tutorial Bang Kanal[/b][/url]
[i]Note :[/i]
[b]var[/b] harus unique (beda) untuk tiap box
[i]Contoh untuk hide friends, fans, mediabox :[/i]
[quote]//HIDE CODE
function rdiv() {
var hide1=document.getElementById("[b]2[/b]");
hide1.parentNode.removeChild(hide1);
var hide2=document.getElementById("[b]7[/b]");
hide2.parentNode.removeChild(hide2);
var hide3=document.getElementById("[b]10[/b]");
hide3.parentNode.removeChild(hide3);
}
window.addEvent('domready', function () { rdiv();});[/quote]

Masukan dari bro [url=http://theftalk.com/p=sundance][b]sundance[/b][/url]
Lebih simple :
[quote]//HIDE BOX
function hidebox() {
var idboxnya=["[b]ID_BOX1[/b]","[b]ID_BOX2[/b]","[b]ID_BOX3[/b]"];
for (i=0;i<idboxnya.length;i++) {
box2hide=document.getElementById(idboxnya[i]);
box2hide.parentNode.removeChild(box2hide);
}
}
window.addEvent('domready', function () { hidebox();});[/quote]
Buat yg belum tau DivID silahkan liat [url=http://theftalk.com/t13870-Friendster-ID-Class.html][b]DISINI[/b][/url]
Moga2 berguna
Last edited by strezzpc (2008-11-11 11:29:29)