Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26315

Re: jquery and hoi polloi

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.javascript
Subject Re: jquery and hoi polloi
Date 2014-12-11 22:52 +0100
Organization solani.org
Message-ID <m6d3lr$d2c$1@solani.org> (permalink)
References (1 earlier) <3e25f0fa-4c3f-4d51-a6a0-da69bd8b3677@googlegroups.com> <27938323-9eca-480c-8ead-2000865bcecc@googlegroups.com> <82684c28-b567-4b2c-8d2b-eb0c41376cd2@googlegroups.com> <m6aupe$esl$1@solani.org> <43afda5d-d558-475d-bf46-4a9e69d99b8e@googlegroups.com>

Show all headers | View raw


Cezary Tomczyk wrote:

> There is nothing wrong with document.getElementById. However, if the
> whole application is already using jQuery and then you'll start
> "mixing" it with native JavaScript (in some places $(...) and in some
> places getElementById) then you might get feedback from others that
> you are breaking consistency of code.

Good point.  However, sometimes you have to use native APIs, because
jQuery doesn't offer wrappers for all of them, anyway.

And, for instance, the official "How to Create a Basic Plugin"
tutorial[1] says:

| Notice also that we're not using the .attr() method to retrieve the
| href attribute, because the native DOM API gives us easy access with
| the aptly named href property.

... and it saves you a dollar. ;)

[1] <http://learn.jquery.com/plugins/basic-plugin-creation>

-- 
Christoph M. Becker

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

jquery and hoi polloi Andrew Poulos <ap_prog@hotmail.com> - 2014-12-03 08:30 +1100
  Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-02 23:33 +0100
    Re: jquery and hoi polloi "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-12-04 21:46 -0800
      Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-10 00:47 +0100
  Re: jquery and hoi polloi danca <cyberdanny@tiscalinet.it> - 2014-12-03 00:14 +0100
  Re: jquery and hoi polloi Erwin Moller <erwinmollerusenet@xs4all.nl> - 2014-12-03 14:47 +0100
  Re: jquery and hoi polloi Gregor Kofler <usenet@gregorkofler.com> - 2014-12-03 16:44 +0100
    Re: jquery and hoi polloi Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-04 22:06 +0100
  Re: jquery and hoi polloi RobG <rgqld@iinet.net.au> - 2014-12-08 18:39 -0800
    Re: jquery and hoi polloi Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-12-09 13:23 -0800
      Re: jquery and hoi polloi RobG <rgqld@iinet.net.au> - 2014-12-10 17:00 -0800
        Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-11 03:16 +0100
          Re: jquery and hoi polloi RobG <rgqld@iinet.net.au> - 2014-12-10 18:37 -0800
          Re: jquery and hoi polloi Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-12-11 11:08 -0800
            Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-11 22:52 +0100
  Re: jquery and hoi polloi Scott Sauyet <scott.sauyet@gmail.com> - 2014-12-16 12:56 -0800

csiph-web