Articles > JavaScript

CSS

HTML5 JavaScript Gem Game With Saved Scoreboard

Everyone is talking about HTML5 games and how they are the future of mobile gaming, but where do you start? What is it you need to do to create a game? In short the answer is actually "not much", everything that I will be using in todays tutorial I've already covered in various different guises in my previous tutorials. We'll be using only pure JavaScript and CSS in this tutorial and the images I've used are from the PlanetCute image pack from Daniel Cook Apologies in advance, but this is a fairly length tutorial....

Using HTML5 Drag And Drop To Create A Shopping Cart

The release of HTML5 introduced native Drag and Drop functionality to modern web-browsers. This means it is now possible to have movable elements on screen without the aid of frameworks like jQuery. This week we'll be taking advantage of the drag and drop functionality to create a basic shopping cart. The basic functionality we'll cover, will be adding an item to the cart and if it already exists updating the quantity and totals. Getting Started ... The first thing we'll need is a basic structure for...

Turning the Querystring into a JSON object using JavaScript

The query string in the DOM has always been a bit awkward, why there isn't a standard method of parsing it is beyond me. The normal route most people follow is to convert it in to a simple array of Key/Value pairs. This allows you to then access the values of the query string using the array accessor syntax. //domain.com/index.html?key=value var value = querystring_array['key']; Still a little clumsy isn't it? Wouldn't it be great to be able to just retrieve the value from a normal JavaScript/JSON object?...

jQuery plugin for caching forms using HTML5 local storage

Have you ever started filling out a form or blog post only to have your session to expire or your browser to crash losing all of your work in the process? HTML5 introduced the concept of browser storage mechanisms. HTML5 storage has the ability to store string values in either local or session variables. The localStorage variable can persists across sessions and can be of any size. This behavior is similar to a cookie, however it does not suffer from the same limitations. In this tutorial we'll be utilizing...
CSS

Creating a Completely Customized Google Map Plugin for jQuery

Last week I briefly touched on the customization possibilities of Google Maps, this week we'll be taking a more in depth look at what exactly you can customize. The options available include customization for all aspects of the map such as: Roads Points of Interest e.g. Schools, Parks and Hospitals Methods of Transport Water Landscape features e.g. Man made or Natural This covers not only custom colors, but the icons and text associated with each element. Getting Started ... This tutorial is a follow...

HTML5 Geo-location API and Google Maps API

In this weeks tutorial we'll be creating a jQuery plugin that serves as an introduction to the HTML5 Geo-location API to request your current location. Once we have the location, we will then draw a route from there to Dublin, Ireland (or wherever you tell it to) using the Google Maps API. This could be used in a HTML5 web application or on a site to tell your customers how to get to you. Getting Started ... First of all we'll need to create our jQuery plugin wrapper. The $.extend function will allow us to provide...
CSS

Automatically generating a table of contents with a smooth scroll effect

Ever written a long article worthy of a table of contents and decided not to do it because it's just too much hassle? This week we'll be writing a jQuery plugin that will automatically search for your headings and create a table of contents based on them for your blog post. We'll also be adding a smooth scroll effect, so that when a user clicks on an entry they are brought to the right section. I know a table of contents is a bit of an unusual topic for a tutorial, but if you're writing a help file for your product,...
CSS

Adding a “You might also like” overlay to another WordPress post using scroll events

How do you encourage users to stay on your site and how do you let them know about the rest of the great content you have on your site? If a user has read or is reading and article on your site, they may like to know about similar content. You could have a series of thumbnails or related articles, but why not give a specific post a little more priority? In this tutorial we'll be using jQuery to detect when the user has scrolled to or near the bottom of the article. Once they are near it, we'll display a small overlay...
Load more
Home CSS Deals DesignBombs HTML HTML5 JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress