I have a dynamically generated panel that slides in and out from the right when a trigger is clicked.
Here is the HTML:
<div id="panel_wrapper">
<div class="trigger">
<a id="trigger"></a>
</div>
<div id="panel" class="right">
<div id="panel_nav">
</div>
</div>
</div>
Here is the jQuery:
$(div).delegate('#trigger', 'click', function() {
$('#panel').toggle('fast');
});
For the record, this works perfectly in Firefox. It slides in and out beautifully. However, it does not work as expected in Chrome or Safari (have yet to test in IE). When tested in Chrome or Safari, it will open and close successfully ONE time. After that, it will no longer function. Here is the kicker. If I do not pass a duration interval | string to the toggle function, it works just fine. $('#panel').toggle();
Initial reaction might be to try other ways to slide in and out, and I assure you, I've tried it. They all produce the same side-effects of working correctly one time, and then no longer functioning. Any clues as to what in the hell could be the issue?
Please let me know if more detail is needed. Thanks ahead of time!