I'm trying to come up with a solution, where if a div is empty, I would like to add a class so that I can display:none;. I tried searching without any luck.
I don't know how to write this expression though? Any help would be appreciated :)
I have a div that contains all my errors on a form. I have it styled and positioned where needed, but when there are no errors, I would like the div to not be visible.
I'm going to see if I can work with the idea above, thanks.
Well that's not going over too well lol. I tried writing that function ( I always get mixed up about the names of php [statements/expressions/functions]) outside the div, inside the class="" itself and lots of different ways, I could never get it to work. I think I was doing it wrong, but not sure?
Sweet, I asked a buddy and he helped out. I was thinking of it the same way and trying like you said, if empty do not display vice if not empty display.
I don't know how to write this expression though? Any help would be appreciated :)
I'm going to see if I can work with the idea above, thanks.