Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

You might not need jQuery?

Featured Replies

Hey all,

 

I have just seen this interesting article about weather you need to have a jQuery dependency in your projects.

 

I wanted to make a post here in the hope that it would help people who only use jQuery and perhaps don't know how to do the things that they are doing with jQuery in Javascript. Really as a learning aid.

 

The article is great because it has jQuery and vanilla Javascript equivalents next to each other so you can examine and see how much harder/easier a particular way of doing something is.

 

here it is:

 

http://youmightnotneedjquery.com/?utm_source=javascriptweekly&utm_medium=email

 

** If I posted this in the wrong place, please move it **

It'd be interesting/great/cool to see kinda a version of http://api.jquery.com/ but with standalone IE compatible snippets for everything there.

 

Not very relevant to your link, but relevant for anyone relying on externaly hosted jquery of recent: http://www.ispreview.co.uk/index.php/2014/01/uk-isp-sky-broadband-shield-accusing-blocking-critical-jquery-website.html

Edited by PipeTenHostingCarl

Anything Jquery does can be written in vanilla Javascript, however most dom manipulation will have issues with browser support especially IE which often needs hacky code to get it working. Jquery is a great tool that fixes these issues and filesize is rarely an problem, its so popular that most visitors will have it cached already. What is important though is that developers should get competant with the language before trying use jQuery. Like knowing knowing how objects, constructors and inhertance work so you actually understand what the Jquery is doing.

Edited by rbrtsmith

  • 2 weeks later...

Anything Jquery does can be written in vanilla Javascript, however most dom manipulation will have issues with browser support especially IE which often needs hacky code to get it working. Jquery is a great tool that fixes these issues and filesize is rarely an problem, its so popular that most visitors will have it cached already. What is important though is that developers should get competant with the language before trying use jQuery. Like knowing knowing how objects, constructors and inhertance work so you actually understand what the Jquery is doing.

 

Maybe, but I've found that it lowers the bar for those who don't quite understand the full spectrum of how javascript works. The nice thing about jquery is that you can "try" it here and there while still learning. Generally speaking it either works or it doesn't so it isn't dangerous to get it wrong. At any rate there should always be fallbacks for users with javascript disabled.

 

In terms of page load it should always be kept in the footer as should any javascript that doesn't need to be loaded before the page itself.

You make a good point, especially for those who just want to input a feature quickly onto their page or have some fun with some functions. But if people want to get into development at a professional level then they really should take the time to learn the underlying language.

 

This then provides a nice foundation to learn out the other Js frameworks like Backbone, Angular which are gonna keep gaining popularity among web-app developers.

You make a good point, especially for those who just want to input a feature quickly onto their page or have some fun with some functions. But if people want to get into development at a professional level then they really should take the time to learn the underlying language.

 

This then provides a nice foundation to learn out the other Js frameworks like Backbone, Angular which are gonna keep gaining popularity among web-app developers.

 

Certainly, Javascript is great language and does seem to be the wave of the future but it is a lot to chew on as a first programming language.

 

The article makes me laugh a bit as I had to use the "vanilla" version when I was new just to do simple animations. If there had been anything as well documented as this to show how to do simple little things that worked in (almost) all browsers I don't know if there would have been such a need for jQuery. Rather ironic.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.