Not sure I'm really using the accordion widget as it's meant to be used but I've automated the showing of the panels so that site viewers can see each panel without clicking.
Problem is if the user scrolls down while the accordion is cycling, the page jumps back up to the next opening panel. I've tried all sorts of return falses and tried deleting the href tags in the html.
Here's minimal code:
<script type="text/javascript">
$(function(){
$("#accordion").accordion({ header: "h3"});
});
itemid=0;
setInterval ("doSomething()", 2000 );
function doSomething(){
itemid++;
$("#accordion").accordion( "activate" , itemid);
if (itemid==2){itemid=-1};
}
</script>
</head>
<body>
<div id="accordion">
<div>
<h3 style="font-weight:bold;"><a href="#">title1</a></h3>
<div>content1</div>
<div>
<h3 style="font-weight:bold;"><a href="#">title2</a></h3>
<div>content2</div>
</div>
<div>
<h3 style="font-weight:bold;"><a href="#">title3</a></h3>
<div>content3</div>
</div>
</div>
<br />
....
Anyone have ideas for me to try?
Thanks.