Browsers

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

Drupal 7 - Building Themes Part 2


Posted in:

In part one, we covered the basics of how Drupal themes work and the base files that are used. We left off on template files, which are the heart of Drupal themes. Today we are going to continue with template files and give some examples of ones every theme will most likely use.

Read More Icon Read More

Drupal 7 - Building Themes Part 1


Posted in:

Drupal is a very powerful, and extensible, CMS and with release of Drupal 7 we saw even more power added to it. However, Drupal has always been known to have a fairly steep learning curve, with a whole lot of new concepts to learn. Today we hope to break some of that curve by showing you how to start your Drupal theme, and bring your Drupal site an exciting new look.

Read More Icon Read More

CSS Positioning - Centering Elements


Posted in:

CSS is a powerful beast, and an essential part to any self-respecting website. With all this power, comes a lot of different tricks that one can employ to accomplish your tasks. Some of these tricks involve positioning your content, and today we are going to touch on that. For this tutorial we are going to reveal some of the best ways to center your content, wherever that content might be.

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

Building jQuery Popups without jQuery UI - Part 1


Posted in:

While the jQuery UI library is quite powerful, and mighty impressive, its footprint is sometimes a bit too much for the project at hand. The UI library also tends to "take over" your HTML, moving it, adding classes, and sometimes even changing attributes around. This can make styling and customizing your UI elements a bit of a pain, especially when you need a custom solution. This is why sometimes you need a UI solution, using jQuery, but without the jQuery UI. Today we are going to work on a draggable popup.

Read More Icon Read More