im Trying to improve my JavaScript skills, but i need some help from people who understand it good.
(im试图提高我的JavaScript技能,但是我需要一些了解它的人的帮助。)
Yesterday i made a simple post slider with JavaScript and i would like to know about quality of the slider. (昨天我用JavaScript创建了一个简单的帖子滑块,我想知道滑块的质量。)
Would be nice to get some advices from developers. (希望从开发人员那里获得一些建议。)
thanks for you time :)
(谢谢你的时间:))
"use strict" var getElement = document.querySelector(".recipes-columns"); var move = 0; var cauntCol = getElement.querySelectorAll(".recipe-column").length; var fullWidth = (cauntCol * 240) - 960; function goLeft() { var getElement = document.querySelector(".recipes-columns"); if (fullWidth == move - 240 || move == 0) { move = 480; getElement.setAttribute("style", "transform:translateX(-" + move + "px);"); } else { move = move - 240; getElement.setAttribute("style", "transform:translateX(-" + move + "px);"); } }
link to the script is here: http://jsfiddle.net/lexin31/zk7acx0q/10
(脚本的链接在这里: http : //jsfiddle.net/lexin31/zk7acx0q/10)
ask by timas31 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…