Mam problem ze scrollbarem uruchamianym w ukrytym div-ie
Jest funkcja pokazywania i ukrywania div-a
Styl docelowy dla diva to display none
Po kliknięciu w link przechodzi do block ale skrypt nie działa.
Link do skryptu http://62.87.243.196/pasek/scrollbar.html
Co może blokować wywołanie paska ?
dodam że gdy div jest ustalony docelowo na block to wszystko działa ukrywa się i pokazuje
<html>
<head>
<title>Demo</title>
<link rel="stylesheet" href="css/demo.css" type="text/css" />
<style type="text/css">
/* optional container div for scroll area and scrollbar */
div#container {
position:relative;
width:270px; height:170px; /* width accommodates scrollbar on right */
overflow:auto; /* for non-javascript */
visibility:visible !important;
}
/* NOTE: styles for code are in external css file named scrollbar.css.
Script segment below writes link tag. */
</style>
<script src="js/dw_scroll_c.js" type="text/javascript"></script>
<script type="text/javascript">
function init_dw_Scroll() {
// arguments: id of scroll area div, id of content div
var wndo = new dw_scrollObj('wn', 'lyr1');
// args: id, axis ('v' or 'h'), eType (event type for arrows),
// bScrollbar (include track and dragBar? true or false)
wndo.buildScrollControls('scrollbar', 'v', 'mouseover', true);
}
// if code supported, link in the style sheet (optional) and call the init function onload
if ( dw_scrollObj.isSupported() ) {
dw_Util.writeStyleSheet('css/scrollbar.css');
dw_Event.add( window, 'load', init_dw_Scroll);
}
</script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function() {
$("#klik").click(function () {
$('#container').slideToggle('normal');
});
});
</script>
</head>
<body>
<p id="klik">Kliknij</p>
<div id="container" style="display: none;"> <!-- optional container div for scroll area and scrollbar -->
</script>
<div id="wn" > <!-- scroll area div -->
<div id="lyr1" > <!-- layer in scroll area (content div) -->
<p>This example demonstrates vertical scrolling with a custom scrollbar. Another example demonstrates with <a href="scrollbar_h.html">horizontal scrolling</a>.</p>
<p>Content repeated for your scrolling pleasure :)</p>
<p>This example demonstrates vertical scrolling with a custom scrollbar. Another example demonstrates with <a href="scrollbar_h.html">horizontal scrolling</a>.</p>
<p>Content repeated for your scrolling pleasure :)</p>
<p>This example demonstrates vertical scrolling with a custom scrollbar. Another example demonstrates with <a href="scrollbar_h.html">horizontal scrolling</a>.</p>
</div><!-- end content div (lyr1) -->
</div><!-- end wn div -->
<div id="scrollbar" ></div> <!-- code adds up, down, track, and dragBar divs -->
</div> <!-- end container div -->
</body>
</html>