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

I've built a javascript/jQu...

Ca2df82ec22313fcd37c67b048235fd2 Talk
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...

Avatar Talk
1
2
3
4
var message = ""
if (XMLHttpRequest.responseText.length > 0)
  message = jQuery.parseJSON(XMLHttpRequest.responseText).error
...

JavaScript Double 'if'

by AlekSi, August 23, 2010 14:32, 6 refactorings, tagged with if

How to make this code looks...

Af19cd0c0141bf7d6b42516706eb1d1d Talk
1
2
3
4
(function () {
    if (!window.console) {
        window.console = {};
...

JavaScript console.log for ie

by lawoffives.blogspot.com, August 20, 2010 15:14, 1 refactoring, tagged with javascript, console

I'm assuming jQuery is pres...

9803fa03938ea54a15ed1954996b1e5c Talk
1
2
3
4
<script type="text/javascript">
	document.onkeyup = KeyCheck;       
	function KeyCheck(e){
...

JavaScript Prevent Default not working.

by Anri, August 19, 2010 16:03, 2 refactorings, tagged with javascript

I am attempting to add Prev...

4058d6b5dc2bfd92fd7f7f9a13eb61a6 Talk
1
2
3
4
function MapWrapper(containerId, userDefinedOptions) {

	MAPWRAPPER_SCOPE = this;
...

JavaScript Javascript googlemap wrappe...

by basit74.myopenid.com, August 18, 2010 12:39, No refactoring, tagged with javascript

I have written a googlemap ...

40f83fc990800c254b7c51f700cad710 Talk
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...

0918379fbd1d6551c6619f94ef4692e0 Talk
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, ...

Avatar Talk
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, 2 refactorings, 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
<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 ...

Avatar 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
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
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
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
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
// 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
		
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
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
(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...

8cb49c7ceb3bf250a0d470009ac9f047 Talk