Create A Forum - Support Forums

Support => Create a Forum Codes and Support => Topic started by: Arekay on February 09, 2011, 08:43:06 am

Title: [Code] Add Dropdown list to Menu Buttons
Post by: Arekay on February 09, 2011, 08:43:06 am
This code will add a dropdown list to the menu buttons that don't already have one.



This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/
Footer:
Code: [Select]
<script type="text/javascript">
   /*Created by Arekay www.symtaxnet.tk*/
                if(document.getElementById("button_PLACE")!==null) $("li#button_PLACE").append("<ul><li><a href='LINK'><span>TITLE</span></a></li><li><a href='LINK'><span>TITLE</span></a></li>/*EXTRA*/</ul>");
</script>

Relplace PLACE with which button you want:
Replace LINK with the link you want

Replace TITLE with the text that will show in the dropdown list

If you want more than two links, Replace /*EXTRA*/ with
Code: [Select]
<li><a href='LINK'><span>TITLE</span></a></li>
Preview at http://www.syntaxnet.tk/ (http://www.syntaxnet.tk/), look at the Help and Arcade tabs