Archive for

How to fix an empty element hight in Internet Explorer with jQuery

Internet Explorer 7 doesn’t render an empty element right, when this element has some layout features (for example, background). The element is supposed to be rendered as it were non existent on the page, instead we have an annoying box with non-zero dimensions. It’s frustrating when you have on your page a message box for … Continue reading

How to implement “show more” and “show less” using a hidden counter when rendering a collection

While rendering a collection, I wanted to hide some items with higher indexes (and show them when clicking on “Show more”). But there is no way to tell the index when rendering :collection => @items. Then I came across this posting: Render partial with collection has hidden counter Now, when rendering <ul> <%= render :partial … Continue reading