JavaScript

18th April
2011
written by Ricky Stevens

I’ve been using jQuery Sortable for quite a while over various projects, and I’ve never encountered any strange behaviour. On my current project however, I had used the jQuery UI Sortable to allow the client to re-order some elements within an HTML list. Oddly though, whenever you scrolled down the page to get to the list, and dragged an element, the offset of the dragged element went a bit mad and flew up the page!

Continue reading “jQuery Ui Sortable – Offset Bug” »

27th December
2010
written by Ricky Stevens

This plagued me for quite some time, and all I found by searching Google were answers that were either 100% wrong (and often idiotic), or people repeatedly saying “use wmode: transparent“. Yeah this is correct, but it didn’t fully accomplish the task at hand. After about 3 hours of searching and finding absolutely nothing of use, I started to do some proper R&D to create my own solution to this problem.

Continue reading “Overlaying Clickable Div Over Flash Movie” »

17th December
2010
written by Ricky Stevens

Today I was passed an article entitled CSS: CamelCase Seriously Sucks! by Harry Roberts, by the front-end developer at work. You guessed it, the article was about CSS Naming Conventions. And it also doesn’t take a genius to work out that Harry Roberts isn’t a massive fan of CamelCase. A summary of his article is that as CSS uses a hyphenated delimiter for all its properties (eg background-color, z-index) you should name your CSS elements in the same hyphenated system. This is a valid point, and at first glance is very logical. However, if you take a step back it might not actually be that practical.

Continue reading “CSS – Element Naming Conventions” »

15th November
2010
written by Ricky Stevens

Recently in the office we had a bit of a head-scratching moment where we experienced some unusual behavior involving transferring HTML-based data from one text area to another using jQuery 1.4.2. The problem occurred in Internet Explorer (we tested in Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8).

Continue reading “jQuery .HTML() Bug in IE” »

4th November
2010
written by Ricky Stevens

As you may know, JavaScript is a loosely typed language meaning a variable can hold any data type at any time. The data types are categorised as Primitive and Composite, where a Primitive data type holds single piece of data and a Composite data type holds a collection. The Primitive data types are generally known to be Numbers, Strings and Booleans, while Composite types are known to be Objects, Literals, Arrays and Functions.

Continue reading “Data Types in JavaScript – Casting and Converting” »