I mean when I click the link for “box1” div it pops open instantly I was wondering if there is a way to have it open slow. Not sure if it will work with this code.
I have jquery 2.0 something running on the page but couldn’t find a way to use it in this situation. See this has a storage cookie that remembers the last state the div was in, i.e. open/closed after page refresh. I would like in to slide down/open not fade.
In the meantime, welcome to vanilla JavaScript. Vanilla or plain JavaScript is a the name that’s given to JavaScript when you avoid the use of large libraries such as jQuery.
I am interested in your view on the compatibility of the proposed solution. After reading about the CSS transform rule I find that it is listed as experimental, as detailed in the following link. MDN
I also find that the JSFiddle example shown here throws errors in IE7 and IE8. Would you say that this solution is suitable for production, or should it be flagged “user beware”?
I am often surprised at how many script solutions I see on the internet that are not what I would call “backward compatible”. These cases are usually excused on the grounds that few users have older browsers, but even a few percent of the world’s internet users is still a very large number. How do you think we should handle this difference between what is possible and what is practicable?
Personally I’d be prepared to lose a percentage in the low single figures - less than 3% maybe. At that point I’d put my time and effort into ensuring my site was both accessible, and RWD compliant. I’d rather pick up additional customers that way, rather than chasing the far end of a fart in older browsers.
IMHO the situation is pretty clear… IE7 and 8 are dead, and anyone still browsing the web with them is probably in much greater trouble than a few broken web sites. What you might do is display a friendly reminder that it’s a serious security risk to use them and a few things won’t work as expected, rather than expensively trying to get everything to work there with elaborate fallbacks etc.
I feel that this is something that is best determined by the person receiving the advice. If they are using the code for production work, it is normally expected that the people putting it into production are aware of compatibility issues and that ie8 usage is at 5%
Having said that though, it is important that issues of compatibility and usability are covered too.
I think first and foremost you need to know your own audience in case your stats differ from the norm but I tend to drop support for old browsers when the browser maker no longer supports that version and stops security updates.
The problem I see with supporting an old un-supported browser is a bit like a car mechanic allowing you to drive your car knowing that its not safe. Entering credit card information into old browsers like IE8 is like playing Russian roulette and indeed banks will no longer support old browsers for this reason. If you support these old browsers then you may end up encouraging users not to upgrade while at the same time putting them at risk to viruses and whatever other holes have been found in their browser code.
Of course if the site is simple and has no forms or interaction with the user then I don’t see a problem in making the page viewable in an older browser. In most cases they just don’t get the fancy stuff.
I also find it a little strange that some people advocate supporting IE8 yet have done nothing to support mobile which has now overtaken all desktop internet use. The same applies to accessibility and inaccessible sites will lose you more users than all of IE put together.
In the end its a balanced choice that you need to make for your particular circumstances but I see that within another 12 months old IE browsers will be off the chart altogether. Especially as you can download a better browser quite easily these days.