Hacker News new | ask | show | jobs
by collin 6583 days ago
I've done ExtJS and jQuery for the same project recently.

Ext has a nice DataStore object for accessing remote data. And Ext has all those great "rich" components. But I found it wasn't much more work to do my own components in jQuery. (Tree is very simple to implement in jQuery from scratch)

The sense of control I have with jQuery is nice.

The main code to handle my own trees:

  _.fn.toggleTreeNode = function(animate) {
    var node = this.filter('button');
    if(animate) {
      node.siblings('ol').slideToggle(animate)
    }
    else { 
      node.siblings('ol').toggle();
    }
    node.parent().toggleClass('closed');
  };
You can see here the implementation is customized to the markup I needed for MY tree. CSS handles the rest, as it should.

My favorite thing about jQuery is it makes doing things the right way very easy.