Javascript

HTML 5 Canvas Tutorial - Converting Images to Grayscale


Posted in:

HTML 5 and the Canvas tag has brought a whole world of possibilities when it comes to image manipulation. This tutorial will demonstrate one of those possibilities that is particularly powerful - getting raw image data and transforming it.

Read More Icon Read More

Javascript - Highlighting Selected Text


Posted in:

I am sure we all have been at a point when we need to highlight something, and most note taking or sharing software allows you to pick and color and go selection crazy. Luckily, however, it is actually surprisingly easy to get a selection and highlight it with Javascript.

Read More Icon Read More

HTML 5 Canvas Tutorial - Rotation


Posted in:

We here at Switch On The Code have been working with and playing around with the HTML5 canvas element. So, today's tutorial is going to build on top of the previous Image drawing tutorial and show you how to rotate drawn images, or really whatever you want.

Read More Icon Read More

HTML 5 Canvas Tutorial - Displaying Images


Posted in:

The Canvas element was introduced a few years ago as part of the HTML 5 standard. This element has opened the doors to incredibly dynamic web applications that in the past were only possible using 3rd party plugins like Flash or Java. This tutorial covers a small but important piece of the canvas element - displaying and manipulating images.

Read More Icon Read More

jQuery Really Simple Tabs


Posted in:

Once again, we find ourselves opening up our favorite IDE and looking jQuery straight in the eye. However, instead of a complex script that controls an alien mothership, we are going to build some really simple, yet useful, tabs. Even though jQuery UI offers some pretty cool tab objects, it is still a very large library and sometimes you just need some simple tabs. Today, we are going to tackle this.

Read More Icon Read More

jQuery Snippet - Interesting Selectors


Posted in:

As usual, here at Switch On The Code we are diving into jQuery once again. However, unlike a typical foray in the Javascript world, we are going to look at some simple jQuery selectors. Not just any selectors though. Today I have some interesting selectors that you may not know about, but can be extremely useful. So let's get started.

Read More Icon Read More

jQuery Snippit - .each()


Posted in:

Here at Switch On The Code we love us some jQuery. We not only have tutorials, but we use jQuery ourselves for the very site you are visiting right now. It makes the life of a web developer so much easier. Sometimes, however, there just isn't a magical jQuery function that does what you need. On occasion you need to select a bunch of stuff and do some custom logic on each element. You don't necessarily need to move all the objects or change some css, sometimes you just need to do something more your own style. This is where the each() function comes in.

Read More Icon Read More

Guide to Simple Animations in jQuery


Posted in:

We have talked about jQuery a lot over the past months, and even more since the humble beginnings of Switch On The Code. There are many reasons for this, and I am sure we all can agree that jQuery is just awesome. From its simple way of grabbing DOM elements down to its powerful extensions that make the possibilities effectively endless. But there is one thing we have covered yet... jQuery Animations.

Read More Icon Read More

Snippit Tutorial - jQuery and the Keyboard


Posted in:

jQuery is no doubt one of the greatest javascript resources you can get your hands one. One of the reasons for this is, without a doubt, its cross-browser compatibility which no doubt takes a lot of work to maintain. An area that this becomes more apparent is keyboard events, and more specifically, capturing such events. In this tutorial, we will be going through the basics of capturing keyboard events, which like most things in jQuery, is pretty simple.

Read More Icon Read More

jQuery Popups without jQuery UI - Part 2


Posted in:

In part 1, we went over the creation of a basic jQuery popup plugin. While this is very useful in itself, it is not that flexible yet. This time around we are going to add a few new features that will make our popup plugin way more flexible and useful. So come on and find out what cool things we will make our popup do.

Read More Icon Read More