Friday, November 20, 2009

JQuery Stuff

$(document).ready(function(){
// your code
});

Put this in your script type=".../javascript" to execute code before the page finishes loading.

********************************

$("[element name]").addClass("[css class name]");

This adds a css class to all elements of that element type.

********************************

For great JQuery effects

http://docs.jquery.com/Effects


********************************


$("a").click(function(event){ event.preventDefault(); $(this).hide("slow"); });


Example of using an effect.

Thursday, November 19, 2009

Browser Shots, looking at your website on various browsers.

A good website for checking your website on various browsers is

www.browsershots.org.

Wednesday, November 18, 2009

C# Regular Expressions

'*' Matches 0 or more patterns.
(e.g. "*[a]" matches 0 or more 'a's)

'+' Matches 1 or more patterns.
(e.g. "+[a]" matches 1 or more 'a's)

'?' Matches 0 or 1 pattern.
(e.g. "?[a]" matches 0 or 1 'a')

'^' Ignores a pattern.
(e.g. "^a" ignores 'a's)
Also, can be used to signify the start of a string.
(e.g. "^[0-9]" will match a string starting with number)

'[]' Used for range patterns.
(e.g. "[0-9]" matches any number between 0 and 9)

'.' will match any character except '\n'.
(e.g. "a.." matches any 3 letter word starting with 'a')

'\d' matches a digit.
(e.g. "\d"matches any 1 character number)

'$' matches the end of a string.
(e.g. "$[a]" matches a string ending in a)