hr not being hidden

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
angus
Veteran Member
Posts: 128
Joined: 2020-05-28 22:27

hr not being hidden

Post by angus » 2022-02-23 14:07

Hi Jan, I have the following working

Code: Select all

var row_1 = dv.addLayout([3,3,3,3])
	.add(1, ["-", "Name"])
	.add(2, ["-", "Address"])
	.add(3, ["-", "City"])
	.add(4, ["-", "Postcode"])
	.wrapLabels();
I have 10 rows like this and I hide them if they are empty. Only problem is the <hr> which is created with the "-" is not hidden. I try to use

Code: Select all

$j('#hr').hide();
but this does not work. do you know what would?
AppGini 22.13

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: hr not being hidden

Post by jsetzer » 2022-02-23 14:27

Well, this question is more a jQuery question than an AppGini Helper question.

Anyway, I'm pretty sure you are using a wrong jQuery selector.

Your selector $j("#hr") will return one element having id="hr", for example <div id="hr">...</div>.

This is not what you want. Try a different selector:

Code: Select all

$j("hr").hide();
This will hide all <hr> tags.

If you want to hide all hr's inside a certain container (for example inside a certain div), you will have to find out the selector of the container, first, then can get all hr-children.

I can only give an example, because I don't know your specific layout and HTML code.

Example

Code: Select all

$j("#TABLENAME_dv_form > fieldset > .form-group > div > hr").hide();
Here is a link for a totorial about jQuery-selectors:
https://www.w3schools.com/jquery/jquery_selectors.asp
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

angus
Veteran Member
Posts: 128
Joined: 2020-05-28 22:27

Re: hr not being hidden

Post by angus » 2022-02-24 12:18

perfect I will give it a go, thanks
AppGini 22.13

Post Reply