//e is the object, and 'op' is a parameter passed that tells us
//if we're increasing or decreasing the value.
function step_change(e, op) {
...

JavaScript An incrementor function tha...

by Danny Peck, June 08, 2009 15:58, 2 refactorings, tagged with javascript, math, increment

Essentially there is a text...

8f5553306c2cf7f4b14153f6117f8e9b Talk
document.observe('dom:loaded', function() {
    var tObjs = document.getElementsByTagName('table');
    for (var x = 0; x < tObjs.length; x++) {
...

JavaScript Highlight the table row on ...

by Danny Peck, May 26, 2009 14:38, 7 refactorings, tagged with javascript, table, highlighting

A fairly common thing to do...

8f5553306c2cf7f4b14153f6117f8e9b Talk
function showBlock(element_id, element) {
    dropdown_tracker = element_id                 //using global variable to track dropdown
...

JavaScript Using global variable for c...

by ttdavett.myopenid.com, May 19, 2009 08:51, 3 refactorings, tagged with javascript, prototype

The following is the code I...

F677fa685a2cfe8aff31f161062db3d3 Talk
// Snippets
function remove_spaces(value) {
	if (value == null || value == "") {
...

JavaScript Jquery functions

by diegorv.myopenid.com, March 23, 2009 16:35, 7 refactorings, tagged with javascript, jquery

I`m a beginner with jquery,...

55502f40dc8b7c769880b10874abc9d0 Talk
var search = 'foo';
var key = null;
...

JavaScript Javascript Switch Statement

by 파이어준, March 16, 2009 06:00, 6 refactorings, tagged with javascript, case, switch

help me produce better code?

9e2c437fb89b21498e262788e45b20c8 Talk
// New function for enviar.
$(document).ready(function() { 
	var options = { 
...

JavaScript jQuery repeating yucky code

by crungmungus.myopenid.com, February 18, 2009 11:30, 6 refactorings, tagged with javascript, jquery

Using the jquery.form.plugi...

B6c85faacb1a59a39f31f8820dcbd478 Talk
$('.answer_filter').change(function() {
  var filter = jQuery(this);
  var select = jQuery('#' + filter.get(0).id); // @TODO find a more appropriate solution
...

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

by sebastian.deutsch.myopenid.com, January 27, 2009 17:19, 3 refactorings, tagged with javascript, jquery, select

I get a change event within...

Bfca16459c82a7836c3d5c8d79f0b640 Talk
$(document).ready(function(){
	// get the text file to be parsed
	$.get('test-data.txt', function(textData){
...

JavaScript Split text into unordered l...

by keif, January 23, 2009 17:10, 5 refactorings, tagged with javascript, loop, array, jquery, List

Using jQuery, I'm trying to...

802c73427a78116c398cfb6765be9c08 Talk
$.fn.grow_input = function() {
  return this.each(function() {
...

JavaScript Expanding input list using ...

by Billskog, January 04, 2009 09:05, 2 refactorings, tagged with javascript, jquery

The idea is to have a expan...

1d61786256cde4ad5a3afb2f1ff3812b Talk
<div id="slideshow" style="background:#FFF">
	<h2 class="slideshowTitle">Around the World with Language</h2>
...

JavaScript Serena Collage slideshow

by tbeseda, November 19, 2008 21:53, No refactoring, tagged with javascript, serena, collage, serenacollage, slideshow

Creating a slideshow in our...

6e585eb21989377a2669d19cca43f40d Talk
<div id="showcase">
  <ul class="nav">
...

JavaScript Tab-Switching in jQuery

by Aupajo, November 19, 2008 00:45, 1 refactoring, tagged with javascript, jquery, tabs

Is there a better way?

Ca3dc3f93730afb41d6753d8bf010a38 Talk
setDefaults = Behavior.create({
  initialize: function(obj) {
    myforms = this.element;    
...

JavaScript Highlight Selected forms, S...

by openid.aol.com/forwardfootmedia, October 10, 2008 01:49, 5 refactorings, tagged with javascript, prototype, Ruby on Rails, lowpro

The script binds itself to ...

Fbb264f64b4ce69bae04764280141faf Talk
var hash = new String(document.location).indexOf("#");
if(hash > 0)
{
...

JavaScript Small Javascript Code

by openid.aol.com/aviewanew, October 06, 2008 01:20, 6 refactorings, tagged with javascript, ajax, history

It's for detecting if you'r...

55502f40dc8b7c769880b10874abc9d0 Talk
function toHTML(code) {
	code = removeTags(code)
	code = convertTables(code)
...

JavaScript Markdown-like editor

by Zodoz, July 03, 2008 01:36, 1 refactoring, tagged with javascript, markdown, editor

Hey all, I've created a Mar...

2bf2366ae73ca0d6974cad4575a16472 Talk
<html>
<head>
...

JavaScript Javascript Coverflow

by Devon, June 02, 2008 11:16, No refactoring, tagged with javascript, coverflow, animation

Recently I've been working ...

75d72a45e763d7c4d2d645596f173de5 Talk
javascript:
popw=window.open('','Tarpipe micro-post','width=800,height=150');
popw.focus();
...

JavaScript Tarpipe to twitter, jaiku a...

by griflet, May 31, 2008 00:52, No refactoring, tagged with javascript, bookmarklet, tarpipe, POST

<a href="http://tarpipe.com...

Aae34a7973a8d98e53764a1c89090c55 Talk
function odump(object, depth, max){
  depth = depth || 0;
  max = max || 2;
...

JavaScript Recursively dump an object

by hubfactor, February 01, 2008 12:40, 3 refactorings, tagged with javascript, recursive, dump

Given an object, iterate th...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
/*
 Example Usage:
    new ImagePreloader({
...

JavaScript Image Preloader

by getopenid.com/deleteme, December 26, 2007 20:34, No refactoring, tagged with javascript, image, preloader, images

I'm looking at the 'createI...

Db11d496fa96adac53b422feb6efd493 Talk
function thousdands(num, decpoint, sep){
	if (arguments.length == 2) {
		sep = ",";
...

JavaScript Thousands

by Kolin, November 29, 2007 12:00, 3 refactorings, tagged with javascript, thousands, number

Formats numbers with thousa...

2f32a949f807af44f74ce14a124b9bad Talk
//function that loops through the elements
function __validateForm(theform){
...

JavaScript Simple form validator with ...

by eljota, November 11, 2007 10:32, 5 refactorings, tagged with javascript, js, form, validation, regex

This is a real simple form ...

D41d8cd98f00b204e9800998ecf8427e Talk
#Functions [javscript]
var ms = 0;
var state = 0;
...

JavaScript Stop Watch

by richardhealy, October 27, 2007 13:31, 3 refactorings, tagged with time, clock, speed, test, javascript

I use this to test speed of...

28e65a85a625f7c0689bcf96ccf6043d Talk