Slider not working in IE8

I’ve added a sliding menu to a site I’m working on but the sliding effect isn’t working in IE8 at all and I didn’t know if anybody had any suggestions? I know the best thing would be to drop IE8 completely, but (despite me telling the client IE8 isn’t supported anymore) they still want to use it!

The slider I’m working on is based on this:

Do you mind showing us your code?

It’s in the fiddle linked above.

The “Checkbox Hack” does not work in IE8, as it doesn’t support the checked pseudo class, you will need some javascript to make it work there.

He siad it was based off of that fiddle. i assumed that he just looked a that and copied or re typed the code over to something else.

1 Like

Thanks SamA74 do you have any links where I could get some ideas for the JS to use? I’m not that good at all with js unfortunately.

Matthew_Parks_Jr - sorry I wasn’t very clear, it uses the same code as the jsfiddle but I’ve changed the text in the live code.

Thats alright, But @SamA74 is right. Check some github repos and see how others did it is my advice :smiley:

JS is not my strong point either, but there are people here who know it well and should be able to help. It’s a fairly standard thing to show/hide menus. There must be plenty of examples around.

This is one example. View the page source to see how it works.
http://htmldog.com/examples/showhide1.html

You’d need to replace the :checked pseudo-class with an actual .checked class, which you then toggle within a click handler. Here’s a fiddle. (Disclaimer: I don’t have the possibility to test it on IE, though.)

Edit: Crap. I just read that the .classList property is not supported in IE < 10. Wait, I’ll see what might work.

Ok, this could work: updated fiddle. According to the MDN, the .className property is supported by any IE.

Thanks guys, really appreciate your help

IE* doesn’t support JavaScript - it was the last IE version that didn’;t - it only supports JScript (the IE proprietary language that looks a bit like JavaScript until you look at it more closely)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.