Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Other Forum Systems
  • [smf] Toggle Quote And Code
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Add Reply
[smf] Toggle Quote And Code
Topic Started: Jan 24 2010, 08:07 AM (35 Views)
Agent Moose Jan 24 2010, 08:07 AM Post #1
Member Avatar
SMF for Free Moderator

Posts:
837
Group:
Former Staff
Member
#14
Joined:
Jul 9, 2008
Coding language
JavaScript
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 :)

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 :)
You could call me Troy :P | The World of Moosey | Newest Blog: SMF for Free Spam Code

Current Project: Zetaboard Javascript Tester (click on the link in the Submenu)

ZetaBoard Javascript Tester Features:
- Code Test box
- Counts how many open brackets/parentheses and closed brackets/parentheses you have in your code to make sure that your code will work.
- New: Inspect Element
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Other Forum Systems · Next Topic »
Add Reply

Track Topic · E-mail Topic Time: 7:17 PM Sep 9
Hosted for free by ZetaBoards