So let say the class was named Round_gen9 I'd replace
$('.Round_gen9'').each(function() {....etc with $('[class^=Round_gen]').filter(function(){ return /Round_gen[0-9]+/.Round_gen( $(this).attr('Round_gen') ); }).each(function(){ var n = $(this).attr('Round_gen').match(/[0-9]+/); // the number after 'class' for current element }); $('n').each(function() {....etc nothing is showing up... so I don't think this is fully right (I mean what I wrote) ideas?? Thanks for the help here... jeremyBass On Sep 23, 11:26 am, ricardobeat <[EMAIL PROTECTED]> wrote: > Using [class^=class] is your best bet, the other option is to loop > over all the possibilities and that is a no-go. Coupled with the > filter function this will give you all elements with classX where X is > a number: > > $('[class^=class]').filter(function(){ > return /class[0-9]+/.test( $(this).attr('class') );}).each(function(){ > > var n = $(this).attr('class').match(/[0-9]+/); // the number > after 'class' for current element > > }); > > hope this helps. > > - ricardo > > On Sep 23, 3:08 pm, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > > That is sort of what I'm aimming at... I'm looking to find the last > > part... they are all class0 class1 class99, but I want to do something > > for each one. > > > basicly tring to find .class(someNUMBER) > > > hope that makes more sense... > > thanks for the help > > jeremyBass > > > On Sep 23, 9:38 am, tlphipps <[EMAIL PROTECTED]> wrote: > > > > Not sure what you're after, but based on your example, I think you > > > could also just do: > > > $([class^='class']).each(function() {....etc > > > > That would find all elements with a class that starts with the word > > > 'class' > > > > On Sep 23, 10:13 am, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > > I think this would work... I'll try after loomin in to the "nth" > > > > thing... thanks for the help, I'll get back soon... > > > > jeremyBass > > > > > On Sep 23, 2:56 am, BB <[EMAIL PROTECTED]> wrote: > > > > > > Maybe you are looking for the $().filter() > > > > > function:http://docs.jquery.com/Traversing/filter#fn > > > > > > I don't know if this is working: > > > > > > $("a[class^='myclass']").filter(function() { > > > > > return /(myclass)[1-9]\d/.test(this.className);}).each(function() { > > > > > > // do something here > > > > > > }); > > > > > > On 23 Sep., 05:13, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > > > > I want to make this work... > > > > > > > $('.class' + [$[1-9][0-9]?] + '').each(function() {....etc > > > > > > > mean that the class would be .class0 or .class99 etc. > > > > > > > thanks for the help > > > > > > jeremyBass > > > > > > > note also tried: > > > > > > $('[class=Round_gen^[1-9][0-9]?]').each(function() { > > > > > > $('.Round_gen'+ [(/$[1-9][0-9]?/)] +'').each(function() { > > > > > > $('.Round_gen'+ (/$[1-9][0-9]?/)]+'').each(function() { > > > > > > along with many others...- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text -