Shaun Mccran

My digital playground

15
J
U
N
2010

JQuery 101: Setting html attributes and content using JQuery

This article follows one from a few days ago, where I explained how to use the JQuery .attr() method to get html attributes. In this article I will show you how a small change to the same .attr() method will allow you to set the value of html attributes.

I'll also cover the .text() and .html methods as they allow very similar functionality.

This article is the second in a planned series demonstrating some of the key concepts of the JQuery library, and how to use it, starting at a beginner level and working up.

Here is an example of setting attributes using JQuery.

[ More ]

11
J
U
N
2010

JQuery 101: Getting html attributes using JQuery

One of the things I find myself doing a lot in JQuery is getting and setting html attributes. It is very easy indeed to get the values of attributes, much like the old style document.getElementById javascript method, except in JQuery it is much easier.

This article is the first in a planned series demonstrating some of the key concepts of the JQuery library, and how to use it, starting at a beginner level and working up.

Here is an example of getting attributes using JQuery.

[ More ]

04
J
U
N
2010

Simple Coldfusion script to detect if a user is on a Mobile platform

After all the 'mobile talk' at the recent Scotch on the Rocks conference my interest was piqued into looking at mobile versions of sites, and how we as developers can try and seamlessly integrate mobile platforms into our web applications.

The article deals with the first step of that, which is detecting if your user is hitting your site on a mobile platform.

There is a full example of this here: http://www.mccran.co.uk/examples/detect/, hitting this URL with an iPhone or Android device will serve up a different response.

[ More ]

03
J
U
N
2010

Fck editor inserting xhtml and browser specific code

I've been using the fck editor to handle my rich text areas in a content management application. I have to say I like the way it works, and it integrates easily with a Coldfusion platform. It does however have a few issues. This article deals with fck editor using xhtml code, and the editor using a few browser specific html rewrites.

Note: I can't have xhtml code in my site, as the definition type is not xhtml, and it fails an accessibility check if any is present.

[ More ]

_UNKNOWNTRANSLATION_ /