$(document).ready(function () {
	['enviar', 'leer'].each(function () {
		initForm(this);
...

JavaScript On jQuery repeating yucky code

by Paul Wilkins, February 23, 2009 07:39

As the error variable is ju...

Aacfa176a8d73ca75b90b6375151765a Talk

JavaScript On jQuery repeating yucky code

by crungmungus.myopenid.com, February 18, 2009 16:32

Well spotted! thank you ver...

B6c85faacb1a59a39f31f8820dcbd478 Talk
var messages = '';
	for (message in responseText.messages){ 
		messages += '<p>'+responseText.messages[message]+'</p>';
...

JavaScript On jQuery repeating yucky code

by V, February 18, 2009 16:26

Not a refactor, but a possi...

D41d8cd98f00b204e9800998ecf8427e Talk
// form fields  
var address = $("#address");
var zip = $("#zip");
...

JavaScript On Perform AJAX request when t...

by Simo Niemelä, February 16, 2009 09:52
23132e1aa8457e11b243a43b578d51dc Talk
$(".tool_block, .view-code").toggle();

JavaScript On Show / Hide Code in Javascript

by Josh N, February 14, 2009 19:39 Star_fullStar_fullStar_fullStar_full

You can put the 2 toggle() ...

60888d58de3bf08cbc0c73e67fd6fd86 Talk

JavaScript On jQuery One-Liner

by Adam Soltys, February 13, 2009 17:30

aleemb, normally I'd agree ...

B4efcc9044b035677a9f61d437e15213 Talk
<ul id="nav">
	<li><a href="#one">Example</a></li>
...

JavaScript On Tab-Switching in jQuery

by bedlam.myopenid.com, February 13, 2009 00:13 Star_fullStar_fullStar_fullStar_fullStar_full

If this idea is that only o...

Afdb6aa91430febdaea8020479bb4208 Talk

JavaScript On jQuery One-Liner

by aleemb, February 11, 2009 13:11

FWIW, you should not be shi...

D41d8cd98f00b204e9800998ecf8427e Talk
var timer;
function countdown(remain,messages, reset){
	if (reset == true)clearInterval(timer);	
...

JavaScript On countdown timer (minutes &a...

by StevenMc, February 06, 2009 11:36

I love this solution. Unfor...

Df637328cb39713a0e3a28b6277618cd Talk
<a id="x_back_button">Back</a>
<a id="x_forward_button">Forward</a>
...

JavaScript On Element Slider for Prototyp...

by r.healy.myopenid.com, February 06, 2009 10:00

More element based. Some ch...

5b3a2fbe4b130f602574b2254b833622 Talk
$('.answer_filter').change(function () {
  var select = $(this);
  ...
...

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

by paul.wilkins.myopenid.com, January 27, 2009 18:59 Star_fullStar_fullStar_fullStar_fullStar_full

The filter variable is the ...

Aacfa176a8d73ca75b90b6375151765a Talk
$('.answer_filter').change(function() {
  var filter = $(this);
  var select = $('#' + filter.attr('id'));
...

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

by Simo Niemelä, January 27, 2009 18:05 Star_fullStar_fullStar_full
23132e1aa8457e11b243a43b578d51dc Talk

JavaScript On Format Currency

by slf, January 26, 2009 17:15

I especially like the unshi...

098e5c1a565b47e9860539fbebc3fa98 Talk
$(document).ready(function(){
  var resultsMax = 15;

...

JavaScript On Split text into unordered l...

by Tien Dung, January 26, 2009 08:19 Star_fullStar_fullStar_fullStar_fullStar_full
5071c5b861341c0dcfcf6ac86327701f Talk
jQuery.fn.checkNext = function() {
  if (this.is(':selected')) {
    this.attr('selected', false);
...

JavaScript On Check next option in select...

by Tien Dung, January 26, 2009 01:22 Star_fullStar_fullStar_fullStar_fullStar_full

Simo refactoring is great. ...

5071c5b861341c0dcfcf6ac86327701f Talk
jQuery.fn.checkNext = function() {
  if (this.is(':last-child') && this.is(':selected')) {
    this.attr('selected', false).parent().children(':first').attr('selected', true);
...

JavaScript On Check next option in select...

by Simo Niemelä, January 25, 2009 21:10 Star_fullStar_fullStar_fullStar_fullStar_full
23132e1aa8457e11b243a43b578d51dc Talk
/* jquery.fieldjump.js */
 
jQuery.fn.jumpsTo = (function(){
...

JavaScript On jQuery One-Liner

by Rene Saarsoo, January 24, 2009 09:22

Maybe something like this...

543d0222ea3269453527c07141d48e4b Talk

JavaScript On jQuery One-Liner

by Adam Soltys, January 24, 2009 01:22

Rene, I'm the culprit with ...

B4efcc9044b035677a9f61d437e15213 Talk

JavaScript On jQuery One-Liner

by Rene Saarsoo, January 23, 2009 22:28

What ever the rest of the c...

543d0222ea3269453527c07141d48e4b Talk
$(document).ready(function(){
  var resultsMax = 15;

...

JavaScript On Split text into unordered l...

by Rene Saarsoo, January 23, 2009 22:17 Star_fullStar_fullStar_fullStar_fullStar_full
543d0222ea3269453527c07141d48e4b Talk
$(document).ready(function(){
	// how many results do we want?
	var resultsMax = 15;
...

JavaScript On Split text into unordered l...

by keif, January 23, 2009 20:25

Awesome - thanks! I'm makin...

802c73427a78116c398cfb6765be9c08 Talk
$(document).ready(function(){
  var MAX_NR_OF_LINES = 15;
...

JavaScript On Split text into unordered l...

by Rene Saarsoo, January 23, 2009 19:53
543d0222ea3269453527c07141d48e4b Talk
/* jquery.fieldjump.js */
 
jQuery.fn.jumpsTo = function() {
...

JavaScript On jQuery One-Liner

by tmpvar, January 23, 2009 18:24
D41d8cd98f00b204e9800998ecf8427e Talk
/* jquery.fieldjump.js */
...

JavaScript On jQuery One-Liner

by tmpvar, January 23, 2009 18:06
2893bc1693002e652210b3705f74b5dd Talk
function formatCurrency(num) {
  num = isNaN(num) ? 0 : num;
...

JavaScript On Format Currency

by Rene Saarsoo, January 23, 2009 08:52

Alright, lets try this.

...

543d0222ea3269453527c07141d48e4b Talk