Thanks Jayachandran!
 
That definitely works but is there a way that it could keep the CSS off
when the visitor leaves the page? Using a cookie maybe?
Here is the page using your example:
http://www.doetest.vi.virginia.gov/z_testing_area/kevin/test-css-off-fro
m-wsg2.shtml
 
Thank you,
Kevin

________________________________

From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org]
On Behalf Of Jayachandran Kandasamy
Sent: Wednesday, January 27, 2010 2:25 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] CSS off button


Hi Kevin,
 
I have tried some sample code for switching off the CSS in jQuery.
 
Please go through this code below and let me know how far it is helping
you - if need anyother assistance please reply 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script src="http://code.jquery.com/jquery-latest.js";></script
<http://code.jquery.com/jquery-latest.js%22%3E%3C/script> >
<link href="css/sample.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
body {
 background-color: #acc;
 color: #fff;
 font-size: 25px;
}
</style>
<style type="text/css">
.chumma {
 background-color: #ff9900;
 color: #123456;
 font-size: 30px;
 width: 500px;
 height: 500px;
}
</style>
<script type="text/javascript">
 $(document).ready(function(){
  $("input.offButt").click(function() {
   if($("head:has(style)") && $("head:has(link)")){
    $("head:has(style)").remove();
    $("head:has(link)").remove();
   }
  });
 });
</script>
</HEAD>
<BODY>
Sample for CSS off
<form name="sampleForm">
<input type="button" value="Click to Off the CSS" class="offButt"
id="offButt" />
<div class="chumma">Hi Kevin</div>
<div class="name">Website group - Kevin</div>
</form>
</BODY>
</HTML>

Thanks,
JC

On Fri, Jan 22, 2010 at 12:22 PM, Erickson, Kevin (DOE)
<kevin.erick...@doe.virginia.gov> wrote:


        Hello fellow WSG'ers.
         
        Could anyone please tell me if there is a right way to put a
clickable button in a web page that will turn off all CSS?
         
        Thanks,
        Kevin


*******************************************************************
        List Guidelines:
http://webstandardsgroup.org/mail/guidelines.cfm
        Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
        Help: memberh...@webstandardsgroup.org

******************************************************************* 



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
******************************************************************* 


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to