Thanks, Matt! :o)
Rick
-Original Message-
From: Matt Quackenbush [mailto:quackfu...@gmail.com]
Sent: Sunday, December 12, 2010 12:45 PM
To: cf-talk
Subject: Re: (ot) jQuery question
In Charlie's example, 'i' is the current index position of the each loop,
while
ubject: Re: (ot) jQuery question
You don't need the i or o arguments for the code I posted. They were
remnants from copying your original code.
>From the docs (http://api.jquery.com/each/):
.each( function(index, Element) )
so the first argument is the index. .each() is looping over an array
: Re: (ot) jQuery question
Hi Rick,
Take a look at the following jQuery Doc link http://api.jquery.com/each/
The order of the parameters matter.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion
In Charlie's example, 'i' is the current index position of the each loop,
while 'o' is the current item (or object) of the index. And yes, they are
arguments passed into the function.
~|
Order the Adobe Coldfusion Anthology now
the first argument position? And the
> same with the variable that's in the second position?
>
> I scoured the Internet trying to get a good explanation of using
> these arguments, but haven't found what I needed to understand.
>
> Thanks for any insight you'
Hi Rick,
Take a look at the following jQuery Doc link http://api.jquery.com/each/
The order of the parameters matter.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?
to:charlie.grie...@gmail.com]
Sent: Saturday, December 11, 2010 10:51 PM
To: cf-talk
Subject: Re: (ot) jQuery question
You're missing a # in your selector for #myTable.
Even with the #, couldn't get your code to run... but the following
seems to work:
$( document ).ready( functio
You're missing a # in your selector for #myTable.
Even with the #, couldn't get your code to run... but the following
seems to work:
$( document ).ready( function() {
var staffOrder = "";
$( '#myTable tr' ).each( function( i,o ) {
if ( staffOrder.length )
Hope some of you jQuery and CF users can answer what
seems to me should be an easy question, but I can't
figure out how to write this jQuery to product a list
of values. (I'll use AJAX and JSON to send the value list
to a cffunction for processing).
Given this HTML:
9 matches
Mail list logo