[b]@ andre[/b]
klo yg ku pake ini dre
[spoiler]<">[/spoiler]
klo yg persi mootools by feruzz ini dre
[spoiler]function addBox(head, code, id, sibling) {
var h = $type(head) ? "<h2>" + head + "</h2>" : "",
sb = new Element("div", {
"id": id,
"class": "commonbox " + id
});
sb.setHTML(h + "<div id=\"content_" + id + "\">" + code + "</div>");
if (/left/i.test(sibling)) {
sb.inject($("0").getParent().getParent(), "after");
} else if (/right/i.test(sibling)) {
sb.inject($("2").getParent().getParent(), "after");
} else {
sb.inject($(sibling).getParent(), "before");
}
return sb;
}
//Addbox code here
// example 1
window.addEvent('domready', function () {
var [color=green]VARIABLE_NAME[/color] = "[color=purple]HTML CODE HERE[/color]";
addBox("[color=#ff33ff]HEADER NAME[/color]", [color=green]VARIABLE_NAME[/color], "[color=#0000ff]CONTENT_ID[/color]", "[color=#ff0000]SIBLING[/color]");
});[/spoiler]
[b]@ oby[/b]
siap by
Last edited by Co_don SanAdH (2008-10-08 14:27:17)