1 2 3
// container = element to put message into // text = what you want the message to say ...
JavaScript Ultra lightweight message &...
by Chad Thiele,
September 01, 2010 04:34,
1 refactoring, tagged with jQuery lightweight notification function
1 2 3 4
filesize_done = 0; path.exists(filename + "." + 0, function(exists) { fs.stat(filename + "." + 0, function(err, stat) { ...
JavaScript Node.js: Calculating total ...
by https://www.google.com/accounts/o8/id?id=AItOawnmwk5vEpvcV26edzd-Y_LguXrbu-o4BVI,
August 25, 2010 23:55,
2 refactorings
Since path.exists and fs.st...
1 2 3 4
var message = "" if (XMLHttpRequest.responseText.length > 0) message = jQuery.parseJSON(XMLHttpRequest.responseText).error ...
JavaScript Double 'if'
How to make this code looks...
1 2 3 4
(function () { if (!window.console) { window.console = {}; ...
JavaScript console.log for ie
I'm assuming jQuery is pres...
1 2 3 4
<script type="text/javascript"> document.onkeyup = KeyCheck; function KeyCheck(e){ ...
JavaScript Prevent Default not working.
I am attempting to add Prev...
1 2 3 4
function MapWrapper(containerId, userDefinedOptions) { MAPWRAPPER_SCOPE = this; ...
JavaScript Javascript googlemap wrappe...
I have written a googlemap ...
1 2 3 4
<script type="text/javascript"> $(document).ready(function() { ...
JavaScript JQuery - snippet to select ...
by pbarney,
August 02, 2010 23:26,
2 refactorings, tagged with javascript, jquery, radio button, input, select all
These two blocks are virtua...
1 2 3 4
function _initCountUpUsers() { var totalUsers = $('#totalUsers'); ...
JavaScript Javascript Loop Refactor
by https://www.google.com/accounts/o8/id?id=AItOawlfLKQUOxClQ5HmGAqM_lnwQLGwjnkD4TI,
August 02, 2010 15:34,
1 refactoring, tagged with javascript loops
This js will take a value, ...
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...
Hi, I am pretty new to JS, ...
1 2 3
function dataStringToArray(dataStr) { var arr = dataStr.split("|"), ...
JavaScript Delimited data string to ne...
Given a string in this form...
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...
1 2 3 4
var reg = /<\/?\w+\s?\/?>/ig; var test = "<em>Risk &<br />Compilance<br />Projects</em>"; test = test.replace(x, ""); ...
JavaScript Regex: Remove all HTML tags...
In my tests this works but ...
1 2 3 4
Function.prototype.waitUntil = function (condition, interval) { interval = interval || 100; ...
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,
3 refactorings
This code works on IE6, im ...
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...
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...
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...
So this is just something I...
1 2 3 4
this.rotate = function (antiClockwise) { if (antiClockwise) ...
JavaScript Rotate co-ordinates
A nice and fun one here. I ...
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...
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...
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...
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...
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...
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,
4 refactorings, tagged with jquery, plugin, html, website
I'm using this plugin in co...
I've built a javascript/jQu...