jQuery and JavaScript

jQuery and JavaScript

What is JavaScript?

Utilise the power of JavaScript for dynamic and user friendly website designs

JavaScript is a scripting language that is used by web developers in order to enhance both the user interface and user experience provided by a website. JavaScript is primarily employed as a client-side language, meaning that the script is executed on the viewer’s computer. An example of a server-side language would be PHP, which is executed on a server with the output being sent to the viewer’s computer.

  • Enhance your visitors' experience
  • Open source - we can modify and develop freely with no restrictions or licensing fees
  • Improve cross-browser and device compatibility
  • 'Noscript' fallback
  • jQuery framework supported
JavaScript Syntax

The implementation of JavaScript enhances the dynamism of a website through user experience improvements and it also gives developers a powerful interface between a visitor’s input and server-side scripts. It is most commonly used as a client-side scripting language and is popular enough to be included on almost all modern browsers by default, regardless of Operating System or device.

User Interface (UI) and User Experience (UX) Improvements with JavaScript

There is only so much that “static” code - such as HTML and CSS - can deliver. For the most part, effects such as animation and image fading cannot be done without the use of something like JavaScript. As an example, slideshows, which have become very popular on many websites, are “powered” by JavaScript. Whilst the HTML and CSS is responsible for the layout - position, height, width, borders and images - it is the JavaScript that allows the images to “slide” from right to left, or to fade from one to another.

Did you know?

Much like CSS, JavaScript is capable of “selecting” HTML elements on a page and applying visual effects to them. Generally, an element will be given an “ID” or “class” attribute which is then “sought out” by the JavaScript code.

Common UI-based JavaScript examples include “drop down” menus - whilst this is technically possible with CSS, it is not always compatible with all browsers so JavaScript is used instead or as a "fall back" for incompatible browsers. On many sites, you will often find a “read more” type button, which, when clicked, “slides” a part of the page down, in order to display more information.

The text is hidden by default, and becomes visible when the user clicks the 'Read More' Button. Incidently, it doesn't have to be a button; it could be text or an image just as easily.

JavaScript can also be used to improve the user experience by simplifying and streamlining procedures such as form error checking and submission. When a form is submitted, rather than the traditional, server-side technique of taking you the visitor to a new page for the result of the submission which seems “clunky” and slow from a user experience perspective, JavaScript can send and receive data without having to reload the current page, or take users to a new page.

What is jQuery?

jQuery is one of many open source JavaScript libraries, which aims to make it easier and faster for developers to develop JavaScript. It is one of the most popular libraries in use today. Its “syntax" is simple to read and makes developing JavaScript a relatively simple affair, whilst providing a great deal of power for developers to harness.

jQuery and JavaScript both take advantage of the ID and class attributes of HTML elements to select and apply any effects or use for data submission purposes. In JavaScript, an element is selected like this:


Whilst jQuery uses the following syntax:


Both of these examples would select an element within HTML with the id “attributename”. ie:

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>

<div id="attributename"><p>This DIV will be selected</p></div>

JavaScript is also by Gold Coast Media for both UI and UX improvements. JavaScript is a fantastic language which helps to ensure we provide website compatibility across browsers, operating systems and devices. Whilst jQuery is not essential for developing JavaScript scripts, at Gold Coast Media, we use it for a number of reasons; its syntax makes is memorable and easily readable at a quick glance, it is will supported through documentation and has a large community following, it is open source and it is simple to integrate in order to achieve helpful and impressive results, without the need to "reinvent the wheel".

Call us on 01271 815024

For quotes, advice or just a chat.