1

Imagine a table, with a cell that expands for many rows.

There is any jquery feature to ensure that the cell content is always visible?

Lets draw here:

             This is the
             Element
             +---------+
             |         |
             |         |
             | Content |  << Where the element is showed!
 +-------+   |         |
 |       |   | Content |  << Where the content should be show
 |       |   +---------+
 +-------+
This is the
visible screen

I made an example on JSFiddle: http://jsfiddle.net/vepo/uzTZ8/1/

I'm trying to build a function to ensure (after resizes and scrolls) that the content is visible inside the cell.

Victor
  • 8,309
  • 14
  • 80
  • 129
  • There is no built in function, but you can make one :) To help you get started, search for `jquery offset`, `jquery window on scroll`, `jquery window on resize`, `window scrolltop` and `window height`. – Karl-André Gagnon Jul 25 '14 at 12:51
  • Yes, I'm building this function. But it's too complex. I'm wondering someone has a solution... :) – Victor Jul 25 '14 at 12:52
  • Well, a developper could code it, but SO is not a *free developper coding for you* site, it's an help center. Show us what you've tried that didnt worked or what part is too complex. We will gladly point you what's wrong. – Karl-André Gagnon Jul 25 '14 at 12:54
  • Or you could take a look at this question : http://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling – Karl-André Gagnon Jul 25 '14 at 12:58
  • I'm made some progress in indentify each possible: http://jsfiddle.net/vepo/uzTZ8/2/ , but when I try to set the `position: relative; top: (something)px;`I have no progress. – Victor Jul 25 '14 at 13:00
  • What is it suppose to do? – Karl-André Gagnon Jul 25 '14 at 13:07

0 Answers0