Coder Social home page Coder Social logo

jquerytree's Introduction

Hi there 👋

jquerytree's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jquerytree's Issues

code review 0228

1.你有很多初始化的样式的代码

$("li").children().hide();
$("li:has(ul)").addClass("listimage");
$("li:not(:has(ul))").addClass("sonimage");

不知道你有没有发现 因为你是在DOM加载完之后再运行js隐藏子元素的,所以会出现子元素闪一下然后隐藏的效果。对此,你可以给子元素加上一个默认的display:noneclass,然后在需要显示的时候叠加class

2.关于动画

现在我的看法就是能用CSS transition或者animation的就用,jQuery的animate这个主要是在需要兼容IE的情况下使用的,现在CSS动画就是准主流,所以我们可以直接全面使用。你写这个组件,jQuery的主要作用就是addClass和绑定click事件,至于动画这些,就写在CSS里会比较好。

这个组件的效果还是实现的不错的,就先不用改了。下一个任务可以注意我说的这些点。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.