Posts Tagged with ‘JavaScript’

And here's what we got:

setInterval(): the sneaky basterd child of JavaScript

Apr 07

So I’ve mentioned at some point or another that a lot of my work at RY has been developing jquery plugins and the like to make our lives easier during the busy reporting season. Overall they’ve worked out pretty well, but every once in a while someone finds a bug with one (or all) that needs addressing. Since they’re my creations, It’s usually put to me to correct these things.

Most of the time, these bugs are a small oversight on my part, or just straight-up stupidity. I’m not perfect, and I’ll gladly fix these things as they come up. I don’t consider bugs in my code that people find to be an affront to my skill; in reality I find them an opportunity to get better at what I do.

Then you run into something like a bug using setInterval, and things just stop making sense.

My jQuery plugin template is open season!

Mar 03

So I’ve been doing a lot of javascript development at work recently. I’ve basically created a lot of our reusable javascript ‘plugins’ to cover the common requirements of the work that we do. In many cases, this resides mostly (but not entirely) in online annual-report creation.

Anyone that’s in the business will know that there are some common functional elements that you end up having to build with javascript: accordions, tabs, faders, sliders, lightboxes, filters, etc. Many of these items can bleed over into non-report sites, such as intranets or even public-facing sites.

Colour Swapper in WordPress

Oct 09

Who likes website colour swappers? Anyone?

When I developed the theme I am currently using, I searched high and low for something I could steal take inspiration from. The funny thing is that most people don’t even know where the colour swapper is on my site. So few in fact that I had to add a caption to it to help make it a little more obvious.

In any case I felt that I would share the method I used to create the swapping functionality on my website. I’m aware that most of it can be figured out with a little imagination and some source viewing, but I think that going through it step by step is more helpful.

UPDATE – 10/09/2008 - In record time, a second pair of eyes looking at this has managed to refine the process. Thank you Bart for pointing out that if the CSS files are named the same as the Title attribute of the Anchor, then you can drop the whole If statement. I’ve updated the tutorial accordingly