reverse noscript example implemented
parent
e8e4363bea
commit
eddb770275
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
/* +-----------------------------------------------------------------------+ *\
|
||||
|* | tooltips styling | *|
|
||||
|* | (c) 2014 Michał "rysiek" Woźniak <rysiek@hackerspace.pl> | *|
|
||||
\* +-----------------------------------------------------------------------+ */
|
||||
/*
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
Styles are here just to underline things, they are irrelevant to the mechanics
|
||||
of the hack.
|
||||
*/
|
||||
.js {
|
||||
border:solid 1px #800;
|
||||
color:#800;
|
||||
background:#fdd;
|
||||
border-radius:3px;
|
||||
}
|
||||
.nojs {
|
||||
border:solid 1px #080;
|
||||
color:#080;
|
||||
background:#dfd;
|
||||
border-radius:3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div>This div is visible always.</div>
|
||||
<noscript>
|
||||
<div class="nojs">This div is visible ONLY when JS is DISABLED</div>
|
||||
</noscript>
|
||||
<div>This div is visible always.</div>
|
||||
<noscript><!--</noscript>
|
||||
<div class="js">This div is visible ONLY when JS is ENABLED</div>
|
||||
<noscript>--></noscript>
|
||||
<div>This div is visible always.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue