Log in

Sign in with your email address and password:

No account? Sign up here.
Forgot your password? Reset it here.
Didn't receive account confirmation email? Request a new one.


jQuery Basics – Improve your website UI

jQuery was developed to make writing JavaScript super fast and easy. JavaScript for those not in the know is a language used by programmers to bring interactivity to a website. Think what happens when you press a call to action button or click on an animation; the functionality that enables these actions to occur is programmed created with JavaScript. JQuery is a JavaScript library that makes a developers life much easier.

What's the Jazz with jQuery?

It handles a lot of things such as HTML document transversal, HTML Manipulating, event handling, animations and much more.  In simpler terms, jQuery makes HTML Document Object Manipulation significantly easier than core JavaScript; it is a free, open source library and is known for its catchy slogan – “Write less, do more”.

According to the official site of this clever Javascript library, it has changed the way that millions of people write JavaScript, and this couldn’t be more than true.

jQuery is written just like JavaScript, but you need a CDN or jQuery file to use the library. Copy this tag below and paste it above the ending body tag to start writing the clever language:

Then open another <script></script> tag and write the jQuery inside or you can also make a new .js file (be sure to link to it!)

Features of jQuery

jQuery includes the following features:
• DOM transversing and manipulation; selecting HTML elements is seamless
• Events Handling
• Fast effects and animations
• Can be used with Asynchronous JavaScript and XML (AJAX)
• Easy to obtain data from JSON (JSON Parsing)
• Lots of Utilities
• Cross-browser support

Why jQuery is faster than JavaScript

With Javascript this is how you would target all the paragraphs in a web page and add a class name of “mystyle” to them:

With jQuery this looks something like this:

You can probably see now how much more efficient and ordered the latter is in comparison to core JavaScript.

What is Chaining in jQuery?

One of the best features that web developers including the Twogs team love about jQuery is the ability to chain attributes to a selector. With core JavaScript, you need to target an element once everytime you need to add an attribute. For example:

See how this is getting repetitive and how we have to call the variable “text” everytime. Now see how much faster it is with jQuery:

Chaining is one of the reasons why we love this programming language and use it daily for web development purposes.

Commonly Used jQuery Plugins

Some of the most frequently used plugins are-
• jQuery UI
• jInvertScroll
• Magnific Popup
• jQuery Mobile
• SVG Magic
• Tooltipsy
• Face Detection

Out of all of them, the first is the most widely used one. It gives you access to a lot of pre-made UI (User Interface) elements like models, calendars, accordions and much more!

Browser Support
jQuery has great browser support. It works fantastically on all major browsers like Chrome, Safari and Firefox. You can use it without worrying about anything.

Should I Use jQuery?

If you are a web developer and work regularly with HTML, CSS and JavaScript to build websites, then absolutely! Learning it will save tons of work because as we discussed, this powerful programming language is literally 100 times faster and easier to write than core JavaScript. If you build websites with just HTML and CSS, these are called static sites. These websites don’t have any interactive aspects to them. If you want to improve your UX (User Experience) vastly then definitely learn JavaScript or jQuery. It’s recommended first to learn the basics of JavaScript and then to jump into jQuery.

Learning jQuery will save tons of work because this powerful language is easier to write than core JavaScriptClick To Tweet

Find this post informative? Let us know with a like!


Submit a Comment