Nevermind... got it.. but I would welcome any help on improving
this thanks for the help
$('[class^=Round_gen]').filter(function(){
return /Round_gen[0-9]+/.test( $(this).attr('class') );
}).each(function(){
$(this).each(function() {var $this = $(this);
var params = $(this
Ok little by little
this does output the alerts but I can't seem to target the embed...
function doSomething() {
var NEWheight = self.childNodes[1].offsetHeight;
var NEWwidth = self.childNodes[1].offsetWidth;
alert ("NEWwidth"+NEWwidth);
alert ("NEWheight"+NEWheight);
$(thi
So tring to work this out... I did this
function doSomething() {
var self = this;
var NEWheight = $("self").contents("embed").offsetHeight;
var NEWwidth = $("self").contents("embed").offsetWidth;
alert ("NEWwidt"+NEWwidth);
alert ("NEWheight"+NEWheight);
$(this).contents(
Here is another go... the problem is that It's not erroring out at
all... I need to figure this out... I just don't have the time under
my belt to do this right... I'v only beed working with javascript for
less then a year, and jquery for like 3 months ~may-be... any help
would be great... thank y
Hello... here is another thry to work around this issue... any ideas
on this...
$(this).contents("[childNodes=0]").not(".readME").addClass("sizeME");
var $size = $(".sizeME");
var $read = $(".readME");
function doSomething() {
var NEWheight = $read.offsetHeight;
var NEWwidth = $read.offsetW
Rock on.. that made more sense... I was not understanding why I needed
that line... but I get it now as far as the rest...
it's just a trageting issue I think this is the latest try
(the last part)
this.innerHTML = ''+this.innerHTML
+'';
htmlOptions.height = this.firstChild.
Right at the start:
$('[class^=Round_gen]').filter(function(){
return /Round_gen[0-9]+/.test( $(this).attr('class') );
}).each(function(){
// at this point $(this) is a single element
var $this = $(this);
var params = $(this).attr('rel').split(':');
etc, etc.
/*** you don't need this,
Hello, ok... so thou yes it works... and I am thankful for you guys
for helping, it through a monkey wrench into the fallowing code... may-
be some one could give me a hand on "this" ... (thats was the area of
issues before :-)
here is the code with the changes as suggested above...
$('[class^=
There is no need for quotes as everything is already a string.
Jeremy, you need to understand what's going on:
$('[class^=Round_gen]').filter(function(){
// checks for any element where the 'class' attribute starts with
'Round_gen'
return /Round_gen[0-9]+/.test( $(this).attr('class') );
//
Just need some quotes around the class name (I forgot to include some
quotes in my example too)
This should work:
$("[class^='Round_gen']")
On Sep 23, 4:04 pm, jeremyBass <[EMAIL PROTECTED]> wrote:
> So tring to get this going I did
>
> var n = '';
> $('[class^=Round_gen]').filter(function(){
>
So tring to get this going I did
var n = '';
$('[class^=Round_gen]').filter(function(){
return /Round_gen[1-9][0-9]+/.test( $(this).attr('Round_gen') );
}).each(function(){
var n = $(this).attr('Round_gen').match(/[0-9]+/);
});
$('.Round_gen'+n+'').each(function() {...ect
and Got it
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]+/);
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(
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 PRO
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 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
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, je
17 matches
Mail list logo