Which is Better to Learn? Java Script vs jQuery


#1

I've been wondering about this for some time, and can't decide which is better to learn; Java Script or jQuery. I know that Java Script is great for helping create interactivity for your website or webpage, but jQuery reduces the steps that it takes.

I know from personal experience that less steps in writing your code isn't always better. Sometime one language might be more flexible and safer than the other. I am not able to come to a conclusion on which one is better to use. Here is a poll to help me decide :slight_smile:

  • Java Script
  • jQuery
  • Both
  • Matter of Preference

0voters


#2

Learn JavaScript first. jQuery does make a lot of stuff with JS easier, but eventually, if you're doing complex stuff with jQuery, you need to know the root language, JavaScript. So I'd say learn at least the basics of JS solidly, then learn jQuery and use it when necessary. A common mistake is to use jQuery for everything, even when it's not needed and simply adds weight and load time to the site - not good :slight_smile:


#3

That is a good conclusion, as I said,

So even though jQuery reduces the steps that doesn't make it better to use then Java Script; however, this doesn't mean that it's bad to use jQuery for certain parts of your code. You however were right when you said,


#4

@williamwallacef13,
Javascript is part of your Browser

It all start's with you,
using a Browser
in which you load a HTML-file,
which we will call the HTML-Document.

This document has a minimal build of


<!DOCTYPE html>
  <html>
     <head>
          <title> </title>
     </head>
     <body>
       <!-- here you insert your HTML-code -->
     </body>
  </html>

The Browser =load's= this document into Memory
in a pattern that is described as
the Document Object Model
in short the DOM.
( the interpretation of the DOM is Browser & Version specific )

            html
             |
       +-----+------+
       |            |
     head          body
       |
     title

In the description of your document in DOM-talk...
you will encounter terms like:
parent children sibling descendants ascendants...

The HTML-Element has no parent
but is a parent to 2 child-Element's
the 'head'-Element
and
the 'body'-Element.

The 'head'- and 'body'-Element,
both being children to the 'html'-Element
are siblings to each-other.

The 'head'-Element is parent to the 'title'-Element...
the 'title'-Element is a child of the 'head'-Element
the 'title'-Element is also a descendant of the 'html'-Element.

The DOM has several interface's
over which you can access the data**/**information
held by the DOM.

One of the interface's is the Element-interface
you can divide the interface into
properties ( consisting of a property-key and it's associated VALUE )
and
methods ( giving you the functionality to manipulate the Elements )
https://developer.mozilla.org/en-US/docs/Web/API/Element
https://developer.mozilla.org/en-US/Learn/HTML/HTML_tags
another interface
you can use to manipulate the DOM is the jQuery-Javascript-Library
from which you use pre-defined Methods
in your Javascript code.

So Javascript-code is the glue
which you use to put together meaningfull code
which has a specific functionality.....

If you read
http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page
you will have a guideline
as for every step which you do not understand
you will have to go on your quest for knowledge.....

If on your quest for knowledge you have an idear or question google search

== the Book ==
jquery [your question] site:developer.mozilla.org
CSS [your question] site:developer.mozilla.org
javascript [your question] site:developer.mozilla.org
[your question] site:jquery.com
[your question] site:getbootstrap.com

== discussions / opinions ==
jquery [your question] site:stackoverflow.com
CSS [your question] site:stackoverflow.com
javascript [your question] site:stackoverflow.com

== guidance ==
www.crockford.com
[your question] site:crockford.com
- - http://javascript.crockford.com/code.html << Javascript coding convention
- - http://javascript.crockford.com/survey.html

http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page
http://www.w3schools.com/jquery/trysel.asp
http://www.w3schools.com/jquery/jquery_ref_selectors.asp
++ bootstrap
http://getbootstrap.com/getting-started/
http://getbootstrap.com/2.3.2/components.html
We now have .col-xs (phones), .col-sm (tablets), .col-md (desktops), and .col-lg (large desktops).


#5

Thx a lot, I will look into it.