web design and coding services with a huge twist of creativity.

Stuff Tagged ‘javascript’

Jornadas da Ria 2011

Published 1 year ago, in Portfolio, Web

Website developed for an Environmentally themed conference at the University of Aveiro. Developed using the CakePHP Framework. Visit the website

Custom Events in jQuery

Published 2 years ago, in Blog, Web

Calendar

If you’ve spent some quality time with Javascript, then you probably already figured out it’s an event-driven language. This means that most things done with Javascript are simply reactions to what can be defined as interesting moments in your application. (…) more after the jump ›

The Power of Undo

Published 2 years ago, in Blog, Web

Can I Has CTRL-Z Plz?

Ah, CTRL-Z. I’m sure at some point in our lives, everyone has wished they had the ability to go back in time and Undo something they did. The ability to undo, however, is rather commonplace in the computer world. It allows one to revert a document to an older state by negating the last action(s) performed and all of their consequences.

If you have used a computer before, I’m sure this feature has saved you numerous times. It’s so deeply rooted in our subconscious people sometimes use it without even thinking about it. If undo is so successful on the desktop, what is the reason for it’s almost non-existance in Web Applications?

(…) more after the jump ›

Quick Tip: Using jQuery.noConflict()

Published 2 years ago, in Blog, Web

If you’re using jQuery along with another Javascript Framework (such as Prototype) which also implements the $ variable, you can give back control over it to whichever library first implemented it by using the following code (right after including jQuery):

jQuery.noConflict();

Now, instead of using $ to select jQuery objects, you will be able to use jQuery:

var el = jQuery("#myID");

However, typing jQuery every single time you want to select something gets old real quick, so you can use this trick when declaring noConflict():

var $j = jQuery.noConflict();

This reassigns the reference to the jQuery object to whichever variable you want. In this example, you can now use $j instead of jQuery as a selector. You’ll be (at least) 10 times more productive now!

A step towards unobtrusive Javascript

Published 2 years ago, in Blog, Web

Unobtrusive Javascript

Separating content from behaviour

When incorporating Javascript behaviour on your pages, you’ll probably want to take advantage of mouse events to trigger certain functions. The most obvious and common example is to display a small modal window when a user clicks a given link on the page. (…) more after the jump ›