# Effect.BlindDown not working properly

**URL:** <https://www.ruby-forum.com/t/effect-blinddown-not-working-properly/73797>\
**Category:** Rails\
**Created:** [October 27, 2006, 3:29am UTC](https://www.ruby-forum.com/t/effect-blinddown-not-working-properly/73797 "2006-10-27T03:29:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/49beb7/32.png) [@vishal](https://www.ruby-forum.com/u/vishal)\
**Post date:** [October 27, 2006, 3:29am UTC](https://www.ruby-forum.com/t/effect-blinddown-not-working-properly/73797/1 "2006-10-27T03:29:05Z")

</div>

Hey guys,  
YES I did do a search =) Here is my code:

index.rhtml:

\<%= form\_remote\_tag :url =\> {:controller =\> "amazon", :action =\> "search"}, :update =\> 'hidden\_div', :loading =\> "Element.hide('hidden\_div'); Element.show('spinner');", :complete =\> "Element.hide('spinner'); Effect.BlindDown('hidden\_div');" %\> Search for Movie: \<%= text\_field "post", "title", :size =\> "15", :style =\> "font-size: 18px; border: 1px solid #BBB" %\> \<%= submit\_tag "Search", :style =\> "font-size: 18px; border: 1px solid #BBB" %\> \<%= image\_tag "ajax-loader.gif"%\> \<%= end\_form\_tag %\>

controller:  
def search

# Query Amazon

request = Request.new(DEV\_TOKEN)  
response = request.keyword\_search params[:post][:title], ‘dvd’, LITE  
@products = response.products.slice(0,5)

render :partial =\> “movie\_item”, :collection =\> @products  
end

partial:

 ![]()

When the BlindDown occurs (on FF 1.5.0.7), if it is the FIRST time  
loading the data, then the blind occurs until about halfway through  
displaying the images and then just _jumps_ to the bottom. If I try the  
same query for the same keyword again or anything later, the blind is  
nice and smooth. Any ideas how to fix this?

Thanks!

---

<div class="post-metadata">

**Author:** ![vishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/49beb7/32.png) [@vishal](https://www.ruby-forum.com/u/vishal)\
**Post date:** [October 27, 2006, 3:36am UTC](https://www.ruby-forum.com/t/effect-blinddown-not-working-properly/73797/2 "2006-10-27T03:36:19Z")

</div>

Btw,  
That hidden\_div is closed AND the problem only occurs when displaying  
images, text blinds down fine. Is there a way to cache the images before  
display or anything?

---

<div class="post-metadata">

**Author:** ![vishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/49beb7/32.png) [@vishal](https://www.ruby-forum.com/u/vishal)\
**Post date:** [October 27, 2006, 5:14am UTC](https://www.ruby-forum.com/t/effect-blinddown-not-working-properly/73797/3 "2006-10-27T05:14:24Z")

</div>

Vishal wrote:

> Is there a way to cache the images before display or anything?  
> Yes, but I don’t know how 🙂

[gucci.com](http://gucci.com) (created by those responsible for scriptaculous) seems to  
cache images before displaying them - if you can figure out how they’re  
doing it. Whole lot of beautiful javascript magic going on there, check  
out the catalog section.

[http://www.gucci.com/](http://www.gucci.com/)

If you figure it out, let us know.

DC

---

<div class="post-metadata">

**Author:** ![vishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/49beb7/32.png) [@vishal](https://www.ruby-forum.com/u/vishal)\
**Post date:** [October 27, 2006, 5:23am UTC](https://www.ruby-forum.com/t/effect-blinddown-not-working-properly/73797/4 "2006-10-27T05:23:31Z")

</div>

David C. wrote:

actually googled and found something. check out the image.complete  
property.  
seems like that’s part of what [gucci.com](http://gucci.com) is using…

DC
