ok I was able to replicate your bug when I added this rule
div#comms>div {float:left;}

so the thing is that you are trying to hide a div that has all its
contents floating, so theoratically, this div has no actual height.

to fix this, you need to apply the known clearfix hack.

add the following to your main.css
.clearfix:after
{content:".";display:block;height:0;clear:both;visibility:hidden;}

and the following to main.html
<!--[if IE]>
<style type="text/css">
.clearfix {zoom: 1;     /* triggers hasLayout */ }
</style>

and apply clearfix rule to your <div id="comms" class="form clearfix" />

this should fix things for you.

cheers

--
mona
mreml...@optaros.com

On Wed, Apr 22, 2009 at 3:24 PM, Mona Remlawi <mona.reml...@gmail.com> wrote:
> most likely it's related to the content of what you are trying to
> apply the effect on.
> I tried your example, works fine on FF & IE6.
> Can you provide more info related to css you apply to div#comms
>
> cheers
>
> --
> mona
> mreml...@optaros.com
>
>
> On Wed, Apr 22, 2009 at 2:24 PM, Ram <yourstruly.vi...@gmail.com> wrote:
>>
>> spawning off other JS functions?
>> nope..
>> I read about how effects queue up and so i need to actually do
>> new Effect.toggle('comms', 'slide');
>> instead of just
>> Effect.toggle('comms', 'slide'); (which was what i was doing before)
>>
>> But that makes no difference.
>> It cant be a browser issue because the demos of these effects on the
>> scriptaculous wiki work on the same browser.
>>
>>
>> On Apr 22, 5:17 pm, Brendan O Connor <brenda...@gmail.com> wrote:
>>> are you spawing of other javascript functions at the same time
>>>
>>> 2009/4/22 Ram <yourstruly.vi...@gmail.com>
>>>
>>>
>>>
>>> > Anyone? Any thoughts at all?
>>>
>>> > On Apr 21, 3:40 pm, Ram <yourstruly.vi...@gmail.com> wrote:
>>> > > Hi all,
>>>
>>> > > I have an RoR app in which Im using Effect.toggle('id', 'slide') to
>>> > > show and hide a div.
>>>
>>> > > However, the actual effect of sliding does not show (neither do
>>> > > 'blind' or 'appear'). Instead, there is a delay (of approximately the
>>> > > time that the effect might take) and the div is just displayed
>>> > > abruptly. The same happens when I toggle it again to hide it too.
>>>
>>> > > The effects were working a few months back. I have changed a lot in
>>> > > the meanwhile in the app as a whole but I dont see why that should
>>> > > cause this problem to arise. The code im using is this..
>>>
>>> > > erb template
>>> > > <%= link_to_function image_tag("/images/comments_y2.jpg"),
>>> > > "toggle_comments();" %>
>>>
>>> > > application.js
>>> > > function toggle_comments() {
>>> > >         new Effect.toggle('comms', 'slide');
>>> > >         return false;
>>>
>>> > > }
>>>
>>> > > comms div
>>> > > <div class="form" style="display:none" id="comms">
>>> > >         <div>
>>> > >                 <div id="comments" >
>>> > >                         ...
>>> > >                 </div>
>>> > >                 <br/>
>>> > >                 <% form_remote_for ... %>
>>> > >                   ...
>>> > >                 <% end %>
>>> > >                 <div style="float:right;">
>>> > >                         <%= link_to_function "Close",
>>> > "toggle_comments();"%>
>>> > >                 </div>
>>> > >         </div>
>>> > > </div>
>>>
>>> > > Could anyone tell me where im breaking the effect?
>>> > > Thank you
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to