March 28, 2024, 06:06:50 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Toggle Code and Quote

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

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: May 04, 2009, 07:19:53 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
« Last Edit: May 05, 2009, 03:14:31 pm by Agent Moose » Report Spam   Logged


Share on Facebook Share on Twitter

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #1 on: May 04, 2009, 07:32:25 pm »

ooo, a little extra too, thanks moose! I really dont get why it wouldnt work in IE though. Doesnt matter, i usd opera (except now when im mobile)  Tongue
Report Spam   Logged

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #2 on: May 05, 2009, 03:14:39 pm »

Code updated!
Report Spam   Logged


Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« Reply #3 on: May 05, 2009, 08:02:17 pm »

Just curious, (so that I don't later make the same mistake) what was wrong that made it not work with IE?
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #4 on: May 05, 2009, 09:17:39 pm »

I was gonna ask the same question, i rarely hear that a code works in one browser and not the other.
Report Spam   Logged

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #5 on: May 06, 2009, 06:38:19 am »

Just curious, (so that I don't later make the same mistake) what was wrong that made it not work with IE?
I was gonna ask the same question, i rarely hear that a code works in one browser and not the other.

Honestly, I don't know why it didn't work.

When I tried the old code in IE, it wouildn't open up the code/quote whenever you clicked on the Quote/code header
Report Spam   Logged


Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« Reply #6 on: May 06, 2009, 06:55:29 am »

What did you fix to make it work?
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #7 on: May 06, 2009, 07:44:16 am »

He said he didnt know, maybe IE just doesnt like him Tongue
Report Spam   Logged

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #8 on: May 06, 2009, 09:53:21 pm »

IE usually doesn't like me Tongue Like my SMF for Free IM code, it doesn't work in IE.

Syntax: Its basically the same thing, but differently coded, and it works Tongue
Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #9 on: June 17, 2009, 05:45:45 am »

So it works with FireFox and not IE?
Report Spam   Logged






Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #10 on: June 17, 2009, 10:39:59 am »

Yes it does Smiley
Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #11 on: June 19, 2009, 03:08:55 am »

OK Cool. Might add when i get back home from School Disco Smiley
Report Spam   Logged






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