Locked History Actions

HtmlJsAndCss

HTML, Javascript and CSS

These are just some links to some articles, blog entries, etc. that I've found useful and will likely want to go back to these again and again

HTML

Javascript

Yahoo Javascript Library

MSDN Article on anti-cross site scripting

Nice article explaining how to setup intellisense for JQuery in Visual Studio

CSS

Combinations

* Show/Hide an HTML div tag using Javascript and CSS

In case this handy little article ever disappears, here's some html showing how to do it.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function toggleLayer( whichLayer )
{
        var elem, vis;
        if( document.getElementById ) // this is the way the standards work
                elem = document.getElementById( whichLayer );
        else if( document.all ) // this is the way old msie versions work
                elem = document.all[whichLayer];
        else if( document.layers ) // this is the way nn4 works
                elem = document.layers[whichLayer];

        vis = elem.style;  // if the style.display value is blank we try to figure it out here

        if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
                vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
                vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
</script>
<title>Your Title Goes here</title>
</head>

<body>
<a href="javascript:toggleLayer('foobar');">toggle show/hide</a>
<div id="foobar" style="display: none;">
THIS IS MY DIV
</div>
</body>
</html>


CategoryWebDevelopment