1
2
3
4
(function () {
    function addHeading(obj) {
        var objType, h2, text;
...

JavaScript On console.log for ie

by paul.wilkins.myopenid.com, August 21, 2010 00:16 Star_fullStar_fullStar_fullStar_full

The major change here is re...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
function _initCountUpUsers()
{
    var totalUsers, ceiling, floot, update;
...

JavaScript On Javascript Loop Refactor

by paul.wilkins.myopenid.com, August 03, 2010 03:18

You can use clearInterval f...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
function AddCommas(value) {
    var match = /^(\d+)(\d{3}[\.]?.*)$/.exec(value.replace(/,/g, ''));
    if (match) {
...

JavaScript On Format Numbers With Commas

by paul.wilkins.myopenid.com, June 10, 2010 02:59

The addCommas should be Add...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
function AddCommas(value) {
    var match = /^(\d+)(\d{3}[\.]?.*)$/.exec(value.replace(/,/g, ''));
    if (match) {
...

JavaScript On Format Numbers With Commas

by paul.wilkins.myopenid.com, June 08, 2010 01:44 Star_fullStar_fullStar_fullStar_fullStar_full

Let's get functional on this.

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
this.rotate = function (antiClockwise) {
  var dir = (antiClockwise) ? -1 : 1;
  temp_x = this.x;
...

JavaScript On Rotate co-ordinates

by paul.wilkins.myopenid.com, March 05, 2010 22:06 Star_fullStar_fullStar_fullStar_fullStar_full
Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On Rotate co-ordinates

by paul.wilkins.myopenid.com, March 05, 2010 22:04

duplicate post

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On filter selectbox with 3000+...

by paul.wilkins.myopenid.com, February 04, 2010 02:25

Not to step on your toes, b...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
function autogeneratepassword(params) {
    var passwd = '',
        length = params.pwlength,
...

JavaScript On Cpanel like password generator

by paul.wilkins.myopenid.com, January 15, 2010 01:39

Here's a further refinement

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On timer.class

by paul.wilkins.myopenid.com, January 01, 2010 23:37

An example usage within the...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
for (var id in ['discount', 'vat', 'salestax', 'freight']) {
    this['invoice_' + id] = this.form.down('#invoice_' + id);
    this['invoice_' + id].observe('change', this._checkFormat.bindAsEventListener(this));
...

JavaScript On Need help with creating a loop

by paul.wilkins.myopenid.com, November 01, 2009 19:54
Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
fireEvent: function(event) {
    var type = event.type;
    if (!this.events) return;
...

JavaScript On Error on closure

by paul.wilkins.myopenid.com, September 08, 2009 15:04

When the timeout runs the h...

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On Error on closure

by paul.wilkins.myopenid.com, September 08, 2009 15:02

[deleted]

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
$(function () {
    $('.toggle')
        .each(function () {
...

JavaScript On Better way in Prototype.js?

by paul.wilkins.myopenid.com, September 01, 2009 14:49

This question has been lang...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
var total = 0;
// For each fieldpair that has a child with a checked input
// we get the sibling with a text input and add that value
...

JavaScript On Port Prototype Code to jQuery?

by paul.wilkins.myopenid.com, September 01, 2009 13:21

The following seems to prov...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
var total = 0;
// For each fieldpair that has a child with a checked input
// we get the sibling with a text input and add that value
...

JavaScript On Port Prototype Code to jQuery?

by paul.wilkins.myopenid.com, September 01, 2009 13:10

The following is a working ...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
$('<select>...</select>')
    .click(function () {...})
    .wrap('<li></li>')
...

JavaScript On jQuery traversing

by paul.wilkins.myopenid.com, August 19, 2009 12:55

* Start from the content th...

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On An incrementor function tha...

by paul.wilkins.myopenid.com, June 14, 2009 00:08

Some good ways to refactor ...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
$(document).ready(function(){
    var tabContainers = $('div.tabs > div');
    function hideSections() {
...

JavaScript On There must be a better way ...

by paul.wilkins.myopenid.com, May 21, 2009 07:32

Here is a way to improve th...

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On There must be a better way ...

by paul.wilkins.myopenid.com, May 18, 2009 06:58

You could use a function th...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />

JavaScript On META tag info

by paul.wilkins.myopenid.com, April 15, 2009 07:13

Double quotes are the more ...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
function helperText($el) {
    $el.observe('click', function(event) {
        var element = event.element();
...

JavaScript On Prototype form functions

by paul.wilkins.myopenid.com, March 27, 2009 02:57

Each form element retains t...

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On Range

by paul.wilkins.myopenid.com, March 18, 2009 00:35

And don't forget to initial...

Aacfa176a8d73ca75b90b6375151765a Talk
1
2
3
4
$(document).ready(function () {
    ['enviar', 'leer'].each(function () {
        initForm(this);
...

JavaScript On jQuery repeating yucky code

by paul.wilkins.myopenid.com, February 23, 2009 07:41

Sorry, my apologies. let me...

7c9baa2e76bc9388e9184b0bdefee71d Talk
1
2
3
4
$('.answer_filter').change(function () {
  var select = $(this);
  ...
...

JavaScript On Get the id of a <select&...

by paul.wilkins.myopenid.com, January 27, 2009 18:59 Star_fullStar_fullStar_fullStar_fullStar_full

The filter variable is the ...

7c9baa2e76bc9388e9184b0bdefee71d Talk
1
2
3
4
class P {
    static void Main() {
        for (int i = 0; i++ < 100; )
...

C# On I hate to do this, but...

by paul.wilkins.myopenid.com, August 14, 2008 01:14

This is how I've refactored...

7c9baa2e76bc9388e9184b0bdefee71d Talk