Hello -
I'm trying to "pair" the following js script with css presentational scheme
the js:the (base) css:/*has its own built-in css*/
<style>
<!--
.hidden { display: none; }
.unhidden { display: block; }
-->
</style>
<script type="text/javascript">
function unhide(divID) {
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidde n':'hidden';
}
}
</script>
</head>
<body>
<div id="col2">
<a href="javascript:unhide('content_title');">
<font face="Century Schoolbook" color="#000000">Content title</font></a>
</font></div>
<div id="col2">
<div id="content_title" class="hidden">
<p style="margin-bottom: 0">
Actual content here.
</p>
</div>
Now my combination comes out to this essentially:.hidden li {
background: #fff;
padding: 3px 8px;
display: table-row;
line-height: 500%;
font: 20px century schoolbook, serif;
transition: background .25s ease-in-out;
-moz-transition: background .25s ease-in-out;
-webkit-transition: background .25s ease-in-out;
}
.hidden li:hover {
background: #ddd;
text-decoration:underline;
}
<div id="content"> works fine. The "unhide('content_title') is unresponsive to the a.hidden :hover css. There has to be a way to get that part to "respond". I can induce changes to other parts of the script; I just can't do it to this particular section. Please help. Thanks!<style>
<!--
.hidden {
display: none;
text-decoration: none;
background: #fff;
}
a.hidden :hover {
background: #ddd;
text-decoration:underline;
padding: 3px 8px;
line-height: 100%;
font: 20px century schoolbook, serif;
transition: background .25s ease-in-out;
-moz-transition: background .25s ease-in-out;
-webkit-transition: background .25s ease-in-out;
}
.unhidden {
display: block;
font: 20px century schoolbook, serif;
}
-->
</style>
<script type="text/javascript">
function unhide(divID) {
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidde n':'hidden';
}
}
</script>
</head>
<body>
<ul class="cities"> //needed for the desired indent on the page
<div id="col2">
<a href="javascript:unhide('content_title');">
<font face="Century Schoolbook" color="#000000">Title of Content</font></a></div>
<div id="col2">
<div id="content" class="hidden">
<p style="margin-bottom: 0">
Actual Content.
</p>
</div>