I now have a small problem that has turned into a purulent wound.
I recreated the Google Business Hours to determine which hours the company opens during the week or if they are closed that day. Now, if they are closed, the user can select the checkbox, and the DIV time is hidden. I'm using .show() and .hide() right now
Now let's say that the user closes the first day and decides to "apply everything" to the rest of the week. I scroll and close the remaining 6 days. However, if the user changes the day in the middle of the week, the .show() or .hide() functions will automatically add "display: block" , and this will ruin the loop.
Why does jQuery add this style when it has never been there initially, and is there a clean way to remove it in a loop before applying .show() or .hide() ?
source share