This article mainly introduces how js achieves top-foldable menu toolbar effects, which enables you to slide over the menu toolbar to fold and expand effects, involving javascript mouse events and style operation skills, for more information, see the examples in this article. Share it with you for your reference. The specific implementation method is as follows:
Menu toolbar that can be foldedScript (JS ={$: function (o) {return typeof o = "string "? Document. getElementById (o): o}, on: function (o, type, fn) {o. attachEvent? O. attachEvent ('on' + type, function () {fn. call (o)}): o. addEventListener (type, fn, false); return JS. on}, move: function (who, attr, val, s, fn) {var fm = parseInt (who. style [attr]) | 0; clearInterval (who ['timer _ '+ attr]); var iFx = (function (form, to, s) {return function () {return form + = Math [form
I hope this article will help you design javascript programs.