1
2
3
4
$(document).ready(function(){
  $('#nav_menu_1').before('<a id="open_all" class="" href="#">Screen reader users can click here to open all menus</a>');
  $("#menu_column ul li").not("#menu_column ul li ul li").each(function(){
...

JavaScript Simple jQuery script - Opti...

by Gareth, July 22, 2010 10:30, No refactoring, tagged with jquery, javascript, cookies

Hi, I am pretty new to JS, ...

A959afc1b4415ada875f4d3eaa889132 Talk
1
2
3
function dataStringToArray(dataStr) {
  var arr = dataStr.split("|"),
...

JavaScript Delimited data string to ne...

by squidsoup, July 07, 2010 23:33, 3 refactorings, tagged with javascript parsing

Given a string in this form...

8740fb2a869928fd0c39531902a83477 Talk
1
2
3
4
<html>
	<head>
		<script>
...

JavaScript delayer

by sgrezzeria, June 08, 2010 09:21, 7 refactorings, tagged with js, ajax

This class prevent massive ...

528de67899017dec3c7568b0ad0622ea Talk
1
2
3
4
# Javascript    
<script type="text/javascript">
    function AddCommas(nStr)
...

JavaScript Format Numbers With Commas

by kathy-wu.myopenid.com, June 07, 2010 18:14, 6 refactorings

I'm adding commas to user i...

94f928c5cde29a190e2062fc7bb7fbdb Talk
1
2
3
4
var reg = /<\/?\w+\s?\/?>/ig;
var test = "<em>Risk &amp;<br />Compilance<br />Projects</em>";
test = test.replace(x, "");
...

JavaScript Regex: Remove all HTML tags...

by codeimpossible, June 07, 2010 13:45, 3 refactorings, tagged with regex regexp

In my tests this works but ...

55997cec217233703cbf68b689578771 Talk
1
2
3
4
Function.prototype.waitUntil = function (condition, interval) {
    interval = interval || 100;
    
...

JavaScript Wait Until

by shawndumas, May 27, 2010 11:53, 1 refactoring

Talk me out of using this...

F9e37fce4b4be49fbb403ee0f40ca379 Talk
1
2
3
4
[html]

<!DOCTYPE html>
...

JavaScript Working jQuery but a bit cl...

by Jermaine, April 19, 2010 14:17, 2 refactorings

Hi Everyone,

I'm changi...

79b4825afe5c22c7d6226037ac81ee69 Talk
1
2
3
4
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
  <tr>
    <td height=1>
...

JavaScript how i make it work on Firefox?

by pbruna.myopenid.com, April 24, 2010 00:57, 2 refactorings

This code works on IE6, im ...

Avatar Talk
1
2
3
4
function encodeHTML(html)
{
  encoded = encodeURI(html);
...

JavaScript Escape HTML

by Nathan, March 31, 2010 13:48, 2 refactorings

All HTML special characters...

D5145c421cd25af6fa577c15219add90 Talk
1
2
3
4
$.fn.hijackChangeItemPlacement = function() {
    var confirm_box = $('<div class="inline notice message" style="display: none;"></div>');
    var loading = $('<p>Väntar på svar…</p>');
...

JavaScript jQuery: Simple AJAX and a f...

by teddyzetterlund, March 24, 2010 17:33, No refactoring, tagged with jquery animation dom

So this is just something I...

44bf7541ad28af4ae7932914c048c69c Talk
1
2
3
function matches(matchString,list)
...

JavaScript Search a string with wildcards

by Nathan, March 03, 2010 00:48, 5 refactorings

I want to have a string whi...

D5145c421cd25af6fa577c15219add90 Talk
1
2
3
4
this.rotate = function (antiClockwise)
{
  if (antiClockwise)
...

JavaScript Rotate co-ordinates

by Nathan, March 05, 2010 15:49, 5 refactorings, tagged with co-ordinates, rotate, matrix

A nice and fun one here. I ...

D5145c421cd25af6fa577c15219add90 Talk
1
2
3
4
// this is a function that creates with_libraryname functions
var lazy_load_library = function (path) {
	return function () {
...

JavaScript Lazy Library Loading

by raganwald, February 26, 2010 22:31, 2 refactorings, tagged with javascript, jquery, jgesture, periodicalupdater, lazy loading, lazy evaluation

There are certain libraries...

Fd0d54f1856a8c9cc03f2e5de7c4bc6d Talk
1
2
3
4
rightOffset = 20;
topOffset = 20;
               
...

JavaScript Center text along a sloping...

by Nathan, February 26, 2010 23:46, 1 refactoring

I've written a countdown to...

D5145c421cd25af6fa577c15219add90 Talk
1
2
3
4
(function($) {
    $.fn.SelectedNav = function(options) {

...

JavaScript jQuery plugin: add class to...

by chad.tolkien.id.au, February 15, 2010 07:03, 3 refactorings, tagged with jquery, plugin, html, website

I'm using this plugin in co...

8cb49c7ceb3bf250a0d470009ac9f047 Talk
1
2
3
4
function changeColours(headerClassColour,contentClassColour,bannerDivColour)
{
	document.getElementById("content").className = contentClassColour + "-content";
...

JavaScript Colour changer

by Nathan, February 19, 2010 13:55, 2 refactorings

Intended to give a create a...

D5145c421cd25af6fa577c15219add90 Talk
1
2
3
4
		
var getRandomNo = function(seed){
	
...

JavaScript learn more explodeEffect

by adardesign.myopenid.com, February 21, 2010 14:51, 2 refactorings, tagged with javascript, jquery, random, ui

This jQuery snippet creates...

Avatar Talk
1
2
3
;(function($) {
        $.fn.extend(
...

JavaScript filter selectbox with 3000+...

by akarzim, February 03, 2010 23:05, 2 refactorings, tagged with jquery, dom, speed, select

This is a little jQuery scr...

0018abed2b5e8b460993ed915adc0d11 Talk
1
2
3
4
function redim_img(apodimg)
{
...

JavaScript pb resize image

by mr6686, January 19, 2010 18:47, 8 refactorings, tagged with resize, image

As a noob in js I ask help ...

3a09c0954a8ee7951398becbb5553f37 Talk
1
2
3
4
Date.prototype.addBizDays = function(n){
 var day = this.getDay();
 var d =  new Date();
...

JavaScript Business Days

by 3nz0, January 23, 2010 21:51, No refactoring, tagged with javascript prototype, javascript date

The function add or substra...

Fa876f707d4e3f879985bfd748c6f0d7 Talk
1
2
3
4
function autogeneratepassword(params) {
	this.chartype_upper 	= params.chartype_upper 
	this.chartype_lower 	= params.chartype_lower 
...

JavaScript Cpanel like password generator

by armano.myopenid.com, January 13, 2010 03:05, 3 refactorings, tagged with password generator, autogenerate password, cpanel

Good day guys,
Ive jst mad...

1cd9c8984f2fdeb996130d54d62a98d9 Talk
1
2
3
4
/**
 * timer.class.js - Version 1.0.0
 * Last update: 01 Jan 2010
...

JavaScript timer.class

by Livingston Samuel, January 01, 2010 14:20, 3 refactorings, tagged with javascript, timer

please review this tiny jav...

5c73a4df4d3d5e8e1f2dc7d7d55a32f1 Talk
1
2
3
4
<script type="text/javascript" src="prototype.js"></script>
<ul id="theUL">
	<li class="toto titi">1</li>
...

JavaScript Select Element with multipl...

by Denis Jacquemin, December 03, 2009 08:23, 4 refactorings, tagged with javascript, prototype, prototypejs, css

Hi all,

With the help of...

56c449f1a408dba893793094599f7fb5 Talk
1
2
3
4
function format_money(n) {
  var buf = [], 
...

JavaScript Money formatting

by Tj Holowaychuk, November 25, 2009 23:05, 7 refactorings, tagged with money, formatting

Just needed to whip up a re...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
  	  if ($('invoice_discount')) {
  	    this.invoice_discount = this.form.down('#invoice_discount');
		    this.invoice_discount.observe('change', this._checkFormat.bindAsEventListener(this));
...

JavaScript Need help with creating a loop

by chipcastle.myopenid.com, November 01, 2009 18:37, 5 refactorings, tagged with javascript prototype

I have the following code t...

31e2b397e15442a2d3ba42db7bd4584e Talk