function ImageEffect(){
    var _activeImage;
...

JavaScript On jQuery ugly rollover code

by lomax, September 24, 2010 17:25 Star_fullStar_fullStar_fullStar_fullStar_full

I would consider this an op...

D41d8cd98f00b204e9800998ecf8427e Talk
(function() {

  var elements = {
...

JavaScript On Looks a bit messy

by garreh.myopenid.com, September 21, 2010 12:45 Star_full

I do like lomax's way of us...

55502f40dc8b7c769880b10874abc9d0 Talk
var elements = {
  'fldCardExpiryYear':  { range: 11 },
  'slFromYear':         { range: 2 },
...

JavaScript On Looks a bit messy

by garreh.myopenid.com, September 20, 2010 22:30 Star_full
55502f40dc8b7c769880b10874abc9d0 Talk
populateDropDownRanges();

...

JavaScript On Looks a bit messy

by lomax, September 17, 2010 21:22 Star_fullStar_fullStar_full

Completely untested, and wi...

D41d8cd98f00b204e9800998ecf8427e Talk
function cancelEvent(e){
  if(!e)return;
  if(e.preventDefault)e.preventDefault();
...

JavaScript On Prevent Default not working.

by lomax, September 15, 2010 19:18

It's "doing nothing" becaus...

D41d8cd98f00b204e9800998ecf8427e Talk
/**
 *  SVGZoomNPan library 1.0
...

JavaScript On Event listeners without pas...

by lomax, September 13, 2010 20:53

The way you've bound the ev...

D41d8cd98f00b204e9800998ecf8427e Talk
/**
 *  SVGZoomNPan library 1.0
...

JavaScript On Event listeners without pas...

by lomax, September 13, 2010 20:53 Star_fullStar_fullStar_fullStar_fullStar_full

The way you've bound the ev...

D41d8cd98f00b204e9800998ecf8427e Talk

JavaScript On Sample Twitter Json Response

by leto, September 09, 2010 21:04

Your laziness and paltry go...

D41d8cd98f00b204e9800998ecf8427e Talk
// container = element to put message into
// text = what you want the message to say
function msg(container, text) {
...

JavaScript On Ultra lightweight message &...

by Chris Brandhorst, September 02, 2010 13:52 Star_fullStar_fullStar_fullStar_fullStar_full

Most jQuery functions retur...

7a927605596a2463b081c2f5cfcb24a9 Talk
// http://github.com/fjakobs/async.js

var async = require("async");
...

JavaScript On Node.js: Calculating total ...

by Fabian Jakobs, August 27, 2010 07:06

With async.js you can rewri...

A6d98536d90d2987d40a6abe731805ca Talk
var message = XMLHttpRequest.responseText;
message = (message.length > 0) ? (jQuery.parseJSON(message).error || t('messages.oh_no_error') : "";

JavaScript On Double 'if'

by Miguel, August 26, 2010 20:24

I think it works this way

972fe29d288b40be23449f27fb0bc3bc Talk

JavaScript On Double 'if'

by Ants, August 26, 2010 18:23

@Robert: Good job factoring...

F9a9ba6663645458aa8630157ed5e71e Talk
var message      = "",
    responseText = XMLHttpRequest.responseText;

...

JavaScript On Double 'if'

by Robert Dougan, August 26, 2010 00:22

I would do something like this

Ffb522eb0929d410d97214b01a4f3fc0 Talk
// http://github.com/creationix/step
var Step = require('step'),
    fs = require('fs');
...

JavaScript On Node.js: Calculating total ...

by Tim Caswell, August 26, 2010 00:04 Star_fullStar_fullStar_fullStar_fullStar_full

Use Step and path.exists is...

C953ddd239707998340e1a6fbb3eeb46 Talk
$(this).siblings('ul').slideToggle(300).end()
       .next().toggleClass('closed').end()
       .toggleClass('nav_arrow_light_up')
...

JavaScript On Simple jQuery script - Opti...

by arkilus, August 24, 2010 23:31

Regarding chaining, this sh...

A1ce281ac971bd75dc12349c40796b67 Talk

JavaScript On Double 'if'

by Adam, August 24, 2010 16:01

Good point. Like I have sai...

A8d3f35baafdaea851914b17dae9e1fc Talk

JavaScript On Double 'if'

by Ants, August 23, 2010 21:14

@Adam: Your refactoring cha...

F9a9ba6663645458aa8630157ed5e71e Talk
var message;

if (XMLHttpRequest.responseText.length > 0) {
...

JavaScript On Double 'if'

by Adam, August 23, 2010 19:26
A8d3f35baafdaea851914b17dae9e1fc Talk
(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

JavaScript On Prevent Default not working.

by Anri, August 19, 2010 16:55

Hey Jacboc, I tested this i...

4058d6b5dc2bfd92fd7f7f9a13eb61a6 Talk
<script type="text/javascript">
	document.onkeyup = KeyCheck;       
	function KeyCheck(e){
...

JavaScript On Prevent Default not working.

by Jacob Relkin, August 19, 2010 16:29 Star_fullStar_fullStar_fullStar_full
0135bb75b1f08484d26239e8117b111c Talk
$('.toggle').click(function(){
...

JavaScript On Simple jQuery script - Opti...

by naugtur, August 04, 2010 11:56

I didn't break it down to s...

C541838c5795886fd1b264330b305a1d Talk
<script type="text/javascript">
  $(document).ready(function() {
    
...

JavaScript On JQuery - snippet to select ...

by Casey, August 04, 2010 11:46
D41d8cd98f00b204e9800998ecf8427e Talk
<script type="text/javascript">
  $(document).ready(function() {
    
...

JavaScript On JQuery - snippet to select ...

by Dharmang, August 03, 2010 09:37

I am using value of select ...

C67373bcc92b632e36856ee07dc9b5cb Talk
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