LF-12465: Fix slide toggle for IE9

Try to avoid one-liner if-else statements. We use JS minimizer/optimizer to reduce size.