-1

Is there a way to get fields that are hidden because of the CSS overflow?

$('input:not('visible')') does not do the trick!

Anthon
  • 69,918
  • 32
  • 186
  • 246
medz
  • 9
  • 3
  • Could you post the code snippet which you are working on? It helps to give your question some context. – CodeMonkey May 27 '15 at 01:03
  • I cant post the snippet because its too huge. Let's just say that I have a table with style overflow:auto and i want to exclude the fields not visible because of the overflow – medz May 27 '15 at 01:22
  • There shouldn't be any issue with it. `overflow: auto` should produce a scrollbar in which the content should still be accessible/visible. – EternalHour May 27 '15 at 01:48
  • try this `$('input[type=hidden]')` from here http://stackoverflow.com/questions/4376664/jquery-access-input-hidden-value –  May 27 '15 at 01:50
  • Then show us a minimal demo that reproduces your problem. See the "[MCVE](http://stackoverflow.com/help/mcve)" guidelines. – David Thomas May 27 '15 at 01:59
  • yes thats the problem overflow:auto produces a scrollbar that makes the field still visible. I want to exclude fields that are not visible unless you use the scrollbar – medz May 27 '15 at 02:33
  • @medz, you can just post the little snippet that you are currently working on, rather than the whole app. – CodeMonkey May 27 '15 at 05:36

1 Answers1

0
var visible = $('input').filter(function() {
   return ($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none');
});
albert Jegani
  • 462
  • 5
  • 15