DISQUS

Alex Bosworth's Weblog: Trying out JQuery

  • dp · 9 months ago
    I'm curious as to what you think is "missing" from jQuery that *is* in Prototype?
  • alexbosworth · 9 months ago
    One thing I couldn't see is easy creation of dom elements through
    objects - ie: var anchor = new Element('a', {'href':url});
  • dp · 9 months ago
    What are you planning to do with that anchor? If you're just going to add it to another element, you can do:

    $("#otherelement").after("Google");

    edit -- please note that there is an actual link in that .after(), but it's being converted automatically

    The idea being that you don't typically just create a url, without doing something with it.
  • alexbosworth · 9 months ago
    But I want to do $('#element').append(new Element('a')); which I don't
    think jquery supports
  • dp · 9 months ago
    Why are you wanting to add an empty ?
  • alexbosworth · 9 months ago
    maybe ill fill it in later when they click on something? I just like
    that syntax of not having to mix my js with inline html strings
  • bhat · 9 months ago
    Did you try Ext.js (http://extjs.com/)? We tried JQuery on a large J2EE project for quite some time and then gave up in favor of ext.js. Ext.js turned out to be very easy and consistent to use.
  • alexbosworth · 9 months ago
    nope never heard of that ill check it out