Ops, change this: $('div.body:visible').slideUp(); to
$bodyVisible.slideUp(); because u already have the element to slideUp in the var :D On Tue, Mar 10, 2009 at 13:51, Leonardo K <leo...@gmail.com> wrote: > I dont know exactly whats wrong in your code, but u can do much simplier > code, like this: > > $(document).ready(function() { > //hide all div.body > $('div.show_wrapper div.body').hide(); > > $('a.show_link').click(function() { > //element to slide Up or Down > var $bodyTarget = > $(this).parent().parent().parent().find('div.body'); > //Look if the document has div.body visible > var $bodyVisible = $('div.body:visible'); > //if bodyTarget is diferent than the bodyVisible, slideUp the > bodyVisible > if ( $bodyTarget[0] != $bodyVisible[0] ) > $('div.body:visible').slideUp(); > //slide down or up the bodyTarget > $bodyTarget.slideToggle(); > return false; > }); > }); > > In the css set width for the div.body to width:870px; then u have smoother > animation withouth jumping > > Test in firefox 3, IE6, IE7, Chrome, Safari, Opera. > > > On Mon, Mar 9, 2009 at 16:52, emmj...@gmail.com <emmj...@gmail.com> wrote: > >> >> Alright so I'm trying to build a custom accordion type functionality, >> now it works fine in Firefox, Chrome and Safari but IE is throwing me >> an error. >> >> An example of the functionality can bee seen at: >> http://www.rememberwhencruisers.com/ >> >> My javascript can be found at : >> http://www.rememberwhencruisers.com/js/site.js >> >> And I'm using the google hosted jquery at: >> http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js >> >> Now IE keeps telling me "Invalid Argument" in the jquery library at >> line 4166 character 5, which is the following code. >> >> fx.elem.style[ fx.prop ] = fx.now + fx.unit; >> >> The line that is causing this error in my javascript is the following: >> >> parent.animate({ height: targetSize }); >> >> Is this a bug or is there something wrong with my code? > > >