[UPHPU] Javascript question
Joseph Scott
joseph at josephscott.org
Sat Jul 11 08:11:19 MDT 2009
On Jul 11, 2009, at 7:06 AM, Justin Hileman wrote:
> Don't try to break out the brevity card when you're arguing against
> jQuery. Try this instead:
>
> $("#sample").val(3);
Oh, you forgot to include the 57,254 bytes of jQuery source above
this, making it slightly bigger than the two lines you show below :-)
I really like jQuery, I use it frequently and encourage others to use
it often. If you are doing any amount of JS I highly recommend using
it (or some JS library, jQuery being my favorite).
But let's not confuse things here. This reminds of the folks who
claim to write a web server 12 lines of Python (or Perl, Ruby, etc.)
by conveniently not mentioning the 37,000 lines of modules that they
imported and built upon.
> vs.
>
> var myselect=document.getElementById("sample");
> myselect.selectedIndex = 3;
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
More information about the UPHPU
mailing list