Home › Forums › Classic DFFS › Having issues hiding a sbs label
- This topic has 3 replies, 2 voices, and was last updated 5 years, 6 months ago by becca.
-
AuthorPosts
-
-
May 22, 2019 at 16:24 #25386
I’ve tried half about a million things, but nothing will hide the label. I know I have the right IDs since I’ve inspected and added “display:none;” to the potential elements and it’s worked correctly, I just can’t get it into my code in a way that works. The less outlandish things I’ve tried are
$("#sbs_OuterTR_888").hide(); $("#sbs_OuterTR_888").addClass('spjshidden'); $("#sbs_customLabel_888").hide(); $("#sbs_customLabel_888").addClass('spjshidden'); $("#888").hide(); $("#888").addClass('spjshidden'); $("888").hide(); $("888").addClass('spjshidden'); document.getElementById('sbs_OuterTR_888').style.display='none'; document.getElementById('888').style.display='none';
I’ve also done a bunch of weird stuff with adding “dffs_”/”sbs_”/”#” to the front and “.sbs_OuterTR”/”.ms-formlabel” to the end and still nothing has worked. I’m not sure what else I can try at this point.
-
May 22, 2019 at 20:46 #25403
sbs_OuterTR_888 does work in rules, while I’m not fond of this solution I have a rule to show the element sbs_OuterTR_888 and one to hide it that I trigger from js at different points. Seems extra odd to me that it works as it should in a rule but not $(“#sbs_OuterTR_888”).hide();
-
May 22, 2019 at 20:58 #25406
The problem is that the side-by-side html is generated on load / change of the tabs. Your Custom JS is trying to hide it before it is actually constructed. This means you must either run this function every time you load this tab, or if you want to permanently hide it, use Custom CSS like this:
#sbs_OuterTR_888{ display:none!important; }
Alexander
-
May 23, 2019 at 21:31 #25428
Okay, so to use it the way I want I would have to put the first reference to the sbs in a function dffs_ready(){} before continuing with my code. That makes a lot of sense since with my rules solution I have to use dffs_ready with my first reference to the rule. This actually helps me understand dffs as a whole a bit better, thanks a ton.
-
-
AuthorPosts
- You must be logged in to reply to this topic.