Simple Machine Codes
April 18, 2024, 03:52:51 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Toggle Code and Quote

Pages: [1]   Go Down
  Print  
Author Topic: Toggle Code and Quote  (Read 400 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: May 05, 2009, 03:16:28 pm »

Footers:
Code:
<script type="text/javascript">
var CorQ = "CHOOSE";

//Created by Agent Moose (revolutionx.smfforfree3.com)
//Thanks for making it work Reid :)
switch(CorQ.toLowerCase()){
case "both": CorQ = ".quoteheader,.codeheader"; break;
case "code": CorQ = ".codeheader"; break;
case "quote": CorQ = ".quoteheader"; break;
}
if(CorQ.match(/(quote|both)/)) $(".quoteheader a").attr("href","javascript:void(0);");
$(CorQ).each(function(){ $(this).attr("style","cursor: pointer;"); });
$(CorQ).click(function(){ $(this).next().toggle(); }).next().toggle();
</script>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,543.0.html

This code lets you toggle the Codes and Quotes in posts.  Just click on the "Code" or "Quote" header Smiley

Replace the text CHOOSE with one of the following:
 - both = Lets you toggle both the Quote and the Code.
 - quote = Lets you toggle only the Quote
 - code = Lets you toggle only the Code.

Enjoy Smiley
Report Spam   Logged

Share on Facebook Share on Twitter



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy