1 john Nov 13, 2007 11:10
3 john Nov 13, 2007 12:01
Bugger, any suggestions ?
4 yabba Nov 13, 2007 13:17
Take the display:none out of your css and use javascript to close the div ( and ideally write the show/hide link with js as well ).
You'll also have a problem if you have more than one toggle on a page as you're triggering of the id.
¥
5 john Nov 13, 2007 13:40
Thanks, I'll digg further and see what I can come up with.
Cheers
6 john Nov 13, 2007 23:11
Yabba, I'm just about there with the exception being that even with $posts_allow_script_tags = true; I'm getting an illegal tag message for script and noscript for this inline JS.
<p><script type="text/javascript">
document.write('<a href="#details" onclick="collapse(\'details\');return false">»Details</a>');
</script>
<noscript>Details:</noscript>
</p>
Any tips?
7 yabba Nov 13, 2007 23:53
Yeah, don't use javascript in your posts ;)
Ideal degradation == javascript "enhances" a visit/experience .... including saving the bandwidth by not downloading the javascript ;)
If it was me I'd have a classname for divs that meant "make me a show hide div" ( bonus is you can also style it for everyone ;) ) and then I'd have an external script that triggered off the classname and did all your "hide and add a show/hide [item]"
An example, hit my blog and there should be a "site.js" that adds an arrow to all my external links ( class="ext" ) that makes them all open in a new window. disable js and there is no arrow ;)
¥
8 john Nov 14, 2007 00:14
I'm beginning to think so as well :-/
Yes, I've looked at your external link trickery before... I'll go back for a peek later and strain me brain :)
John wrote:
*cough* degradation .... it should fail "open" without js ;)
¥