151 Posts
jimenaes
8 years ago
5
Topic

Hello

I'm using 6 Search&List fields to make  a grid from 6 different search types inside the bottombody of a content type. Everything works fine but if one of the search has no results I get a blank box because the field div is there although the search result is empty. What I need is to hide those empty divs so my grid has no "holes". Is there any way I can hide the div ? How can I get the search result value so I can make invisible the div container (maybe by CC3)?

Another question: If use the Search&List field instead a module field (which calls a search type...) how can I have the "see more" option?

thanks a lot

Get a Book for SEBLOD
4229 Posts
Kadministrator
8 years ago
4
Level 1
151 Posts
jimenaes
8 years ago
0
Level 2

Oh!!! Thanks, I'll try it

151 Posts
jimenaes
8 years ago
2
Level 2

No, doesn't works because the div that is empty is not the one a need to hide but its grand parent, the one with the class "cck_module_list" :(

<div class="cck_module_list">

<div>
<div id="cck30r"> </div> </div>

</div>

Is there a way to call the grand parent of a div which is empty?

Thanks

31 Posts
gzukry
8 years ago
1
Level 3

With some jQuery you could yep. But I'm not good enough yet to drop the full code now. 

As soon I'll have to use that, I'll push you the way to do it with jQ.

I think you'll have to use "length" and test if value exists ( > 0) in the child div (in module so), then aim the parent div(s) and hide or delete it.

1283 Posts
Bucklash
8 years ago
0
Level 4

Hi

Might not be aware of jQuery's:

parent();

parents();

Bucklash

Get a Book for SEBLOD