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 ]

10
M
A
Y
2010

Incredibly simple JQuery image change on mouse over effect

I was recently asked in conversation if it would be possible to have a list of items, and when a user mouse'd over the headers in the list, an image effect happened, IE a thumbnail image was displayed. I figured this would be an ideal use for JQuery, so this article is how to write an incredibly simple JQuery image change.

There is a full demo of this here: JQuery mouse over demo

[ More ]

04
M
A
Y
2010

JQuery multiple show and hide div’s based on click event

This article shows how to use JQuery to show and hide many div's at the same time, revealing the content that the user requests. It also degrades gracefully if you turn off Javascript.

Have you ever tried to display a Questions and Answers type page, where the Question is a clickable link that shows the corresponding Answer (FAQ's)? It is quite tricky to make this interesting, and Accessible to impaired users.

A full demo of multiple show and hide divs is here: link

[ More ]

_UNKNOWNTRANSLATION_ /