Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Settings
- var window = http://mc.zephyrgaming.net/Dynmap/;
- var tabname = Dynmap;
- var imgloc = Images/map.png;
- var placement = 3;
- //Tab on left side of page
- //Change "tabname" to "whatever". Tabname is what you see on the tab
- var img = document.createElement("img");
- //Change map.png to your own icon image. Located in Modern/Images/
- img.setAttribute("src", "imgloc");
- img.setAttribute("alt", "tabname");
- var span = document.createElement("span");
- span.innerHTML = "tabname";
- var link = document.createElement("a");
- link.setAttribute("class", "sidetab");
- link.setAttribute("href","#tab_tabname");
- link.setAttribute("id", "tabhead_tabname");
- link.appendChild(img);
- link.appendChild(span);
- var sidetabs = document.getElementById("sidetabs");
- //change this 3 to which row you want 5th down would be 6, 7th down would be 8
- var after_link = sidetabs.getElementsByTagName("a")[placement];
- sidetabs.insertBefore(link, after_link);
- //Page Content
- //Main Div
- var tabdiv = document.createElement("div");
- tabdiv.setAttribute("class", "tabarea");
- tabdiv.setAttribute("id", "tab_tabname");
- tabdiv.innerHTML = ("<h3>tabname</h3>");
- //Iframe
- var tabiframe = document.createElement("iframe");
- tabiframe.setAttribute("src", "window");
- tabiframe.setAttribute("height", "500px");
- tabiframe.setAttribute("width", "100%");
- //Second Div
- var tabconents = document.createElement("div");
- tabconents.setAttribute("class", "tabcontents");
- //Third Div
- var maparea = document.createElement("div");
- maparea.setAttribute("id", "maparea")
- maparea.appendChild(tabiframe);
- tabconents.appendChild(maparea);
- tabdiv.appendChild(tabconents);
- tabs.appendChild(tabdiv);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement