function () { $('.caption-1').animate({ bottom:0 },200); },
function () { $('.caption-1').animate({ bottom:-35 },200); }
);
$(".slide-2").hover(
function () { $('.caption-2').animate({ bottom:0 },200); },
function () { $('.caption-2').animate({ bottom:-35 },200); }
);
Can anyone help me with cleaning it up so that I don't have to repeat this block over and over manually? I know I can get jQuery to repeat each code block and insert the number automatically, but I'm not sure where to start.
For some reason I can't get links in my toggle divs to work. Here's my markup structure: <div class="accordion_toggle"><a href="www.mysite1.com">Studio 1</a></ div> <div class="accordion_content">...</div> <div class="accordion_toggle"><a href="www.mysite2.com">Studio 2</a></ div> <div class="accordion_content">...</div> and so on... Before you ask, the 'a' tags are generated dynamically, but only under certain conditions, otherwise there wouldn't be any need for the accordion obviously :) Here's my javascript: jQuery(document).ready(function(){ jQuery('#accordion_list').accordion({ header: '.accordion_toggle', active: '.selected', alwaysOpen: false, autoheight: false, animated: 'easeslide' }); }); The accordions work as intended, and if one has a 'a' tag the url is visible in the markup and in the status bar when mousing over the link, but clicking on the link produces nothing. Does anyone have any idea why this might happening? It's as if the jquery/accordion script is somehow 'killing' the 'a' tags behaviour. Thanks.
Hi all. I've just downloaded and tried the jquery accordion and it seems to be working fine, but with one exception. When I test my page in IE7 all my accordion DIVs open completely on page load and then close immediately, so it sort of 'flashes', which is pretty off- putting. I've also tried the page in FF (Mac) and it's fine - either it's so quick I can't see the same thing happening, or there's a difference in the way IE7 is working. I'm simply using one of the examples off the demo page: jQuery(document).ready(function(){ // first simple accordion with special markup jQuery('#list3').accordion({ header: 'div.title', active: false, alwaysOpen: false, animated: false, autoheight: false }); }); Can anyone help as I'm not that familiar with javascript. The only thing I can think of (although I don't know how to do it), would be to set (inline) each child DIV to display:none (or something), but then the accordion script would need to change this to 'block' once it has loaded and is ready to work. Is this possible?... Thanks :)