Articles > jQuery

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...
CSS

A WordPress slider template (with CSS3 animations and minimal jQuery)

Almost every site you see these days has an image slider on the front page. They come in all sizes and depending on who you ask, they have limited benefit to a sites traffic or navigation compared to the amount of space they take up. But they look pretty and when used correctly can be fairly effective. This tutorial aims to create a simple WordPress page template with a slider that allows you to include a few posts that have been added to a slider category. To make it more interesting, we're going to make it book-markable,...

Adding an admin or settings page to WordPress

A few weeks ago in my Google Maps Shortcode for WordPress tutorial I covered how to create a basic shortcode. All of the settings required for the Google Maps API where included as configurable attributes for the shortcode. It was discussed in the comments that perhaps it would be better to set some of those options globally. One option discussed was modifying the wp-config.php file, this I don't think is a great idea. It would mean that it could be potentially overwritten by upgrades and is not easily...
CSS

My favorite development tool set, keeping it simple

When I first started playing around with websites in the late nineties (wow, I feel old now) there wasn't much in the way of choice for development IDE's, there was really only Microsoft FrontPage and Macromedia (now Adobe) Dreamweaver. Being honest they weren't great, Dreamweaver's big claim to fame was that it generated cleaner html than FrontPage. Both where poor by today's standards, this was mainly because they where WYSIWYG editors, allowing even novices to create simple pages. When I went...
CSS

Creating a jQuery gallery for Flickr

This week, we'll be creating a simple jQuery gallery that uses the Flickr API to retrieve a list of images from a photo set and display them. We'll also be using the API to get some additional information about the images and storing it using the HTML5 data-* attributes The Flickr API ... To use the API you need to register for an API key, it doesn't take long and you can start here There are 2 methods that we will be using for this tutorial, first we'll need to get name and description of the specified photo set....

Creating a Google Maps shortcode for WordPress

This week we'll be extending WordPress by adding a custom shortcode. This shortcode will allow us to add a Google Map to a post using a simple piece of text in a post or page. Shortcodes are a quick and easy way to add functionality to a post in WordPress. They look something like this: [ gallery ids="1,2,3,4"] We'll also using PHP based Object Orientated Programming (OOP) to create our shortcode. We'll create a basic class, that has some static functions with in. We'll be using static methods because we...
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