[jQuery] Re: Using values.jquery to switch values of fields

2009-10-16 Thread Nathan Bubna
oops. hit send too early: ;(function($) { $.fn.valueswap = function(selection, opts) { var $right = $(selection) r = $right.values(opts), l = this.values(opts); $right.values(l, opts); this.values(r, opts); return this; }; })(jQuery

[jQuery] Re: Using values.jquery to switch values of fields

2009-10-16 Thread Nathan Bubna
you could even make it a mini-plugin: ;(function($) { $.fn.valueswap = function(selection, opts) { var hold = $(selection).values(opts), On Fri, Oct 16, 2009 at 2:16 PM, johnHoysa wrote: > > Figured it out, only tested on FF. > > $('.toleft').click(function() { >                var

[jQuery] Re: Using values.jquery to switch values of fields

2009-10-16 Thread johnHoysa
Figured it out, only tested on FF. $('.toleft').click(function() { var values2 = $('.left').values(values2); var values = $(this).parents('div.box').values(); var $right = $('.right').values(values2); var $left = $('.left').values(values); r