[jQuery] Help with the Scroll Function
Hi and thanks in advance to any who can help.
I am trying to build out a portfolio site (http://www.xyforge.com/
portfolio) and am using the scroll function to show/hide content. The
problem that I have is I want the first child of the #content <div> to
initially display on load, and then disappear on any subsequent clicks
of the menu.
Here's the function:
<script type="text/javascript">
var cel = null;
function toggleContent(el)
{
if (cel) {
$('#' + cel).slideUp('slow');
}
if (el != cel) {
cel = el;
$('#' + cel).slideDown('slow', function(){$('#h_' +
cel).ScrollTo(1000);});
} else {
cel = null;
}
return false;
}
</script>
Here's the content layout:
<div id="content">
<div id="fold_01">//initially display me</div>
<div id="fold_02">//hide me</div>
<div id="fold_03">//hide me</div>
..and so on
</div>
Thanks!