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); $(this).contents("embed").css("heigh",NEWheight+'px'); $(this).contents("embed").css("heigh",NEWwidth+'px'); }; the problem is that in the dom it seems to me that that the embed is not really a child of the div... is there a better way to target that embed?... thanks for the help here... jeremyBass On Sep 24, 10:52 am, jeremyBass <[EMAIL PROTECTED]> wrote: > 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("embed").height(NEWheight+'px'); > $(this).contents("embed").width(NEWwidth+'px'); > > }; > > I can't for the life of me get the alerts to output anything but > undefined... ideas??? > thanks > jeremyBass > > On Sep 24, 10:21 am, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > > 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 you ricardobeat and tlphipps for the help so > > far... Have a great one today > > jeremyBass > > > this is the latest try.... (the last part) > > > htmlOptions.height = this.firstChild.offsetHeight; > > $this.addClass('').prepend($.fn.flash.transform(htmlOptions)); > > $(this).contents("embed").not(".readME").addClass("sizeME"); > > > function doSomething() { > > var NEWheight = $(".readME").offsetHeight; > > var NEWwidth = $(".readME").offsetWidth; > > $(this).contents("embed").height(NEWheight+'px'); > > $(this).contents("embed").width(NEWwidth+'px'); > > > }; > > > On Sep 24, 9:57 am, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > 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.offsetWidth; > > > $size.height(NEWheight+'px'); > > > $size.width(NEWwidth+'px'); > > > > }; > > > > Any help here would be great... I'm just spining my wheels at this > > > point but I don't want to go back wards to what worked as the whole > > > start of this issue would be back.... thanks for anyhelp here... > > > Jeremy > > > > On Sep 24, 12:51 am, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > > 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 = '<div class="clear_children readME">'+this.innerHTML > > > > +'</div><div class="clear_children"></div>'; > > > > htmlOptions.height = this.firstChild.offsetHeight; > > > > $this.addClass('').prepend($.fn.flash.transform(htmlOptions)); > > > > > $(this).contents("[childNodes=0]").not(".readME").addClass("sizeME");// > > > > fix bleeding to the last div > > > > > var $size = $(".sizeME"); > > > > var $read = $(".readME"); > > > > function doSomething() { > > > > var NEWheight = $ > > > > (this).contents("[childNodes=1]").not(".sizeME").offsetHeight; > > > > var NEWwidth = $ > > > > (this).contents("[childNodes=1]").not(".sizeME").offsetWidth; > > > > $(this).contents("[childNodes=0]").not(".readME").height(NEWheight > > > > +'px'); > > > > $(this).contents("[childNodes=0]").not(".readME").width(NEWwidth > > > > +'px'); > > > > > }; > > > > > var resizeTimer = null; > > > > $(window).bind('resize', function() { > > > > if (resizeTimer) clearTimeout(resizeTimer); > > > > resizeTimer = setTimeout(doSomething, 3); > > > > }); > > > > > }); > > > > > this it the order... > > > > > <div class="Round_gen1"> > > > > <embed class="sizeMe"> > > > > <div class="readMe"></div> > > > > </div> > > > > > so I'm tring to get the embed to match the size of the offset of the > > > > nextSibling > > > > > just have not found a good way to do this ... the script doesn't throw > > > > any errors... but anit working .. any help would be great ... thank > > > > you more and more this is coming in to focus > > > > > jeremyBass > > > > > On Sep 23, 11:53 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > > > > > > 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, it's only if you need the number in the > > > > > className var n = $(this).attr('class').match(/[0-9]+/); ***/ > > > > > > didn't have time to look through the rest of the code though. > > > > > > On Sep 23, 11:10 pm, jeremyBass <[EMAIL PROTECTED]> wrote: > > > > > > > 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^=Round_gen]').filter(function(){ > > > > > > return /Round_gen[0-9]+/.test( $(this).attr('class') > > > > > > );}).each(function(){ > > > > > > > var n = $(this).attr('class').match(/[0-9]+/); > > > > > > $(this).each(function() {var $this = $(this); > > > > > > var params = $(this).attr('rel').split(':'); > > > > > > $(this).flash({flashvars: { > > > > > > right_off : ['' + params[4] + ''], > > > > > > left_off : ['' + params[5] + ''] > > > > > > .join(' ') > > > > > > }}, { version: 8 }, function(htmlOptions) { > > > > > > > htmlOptions.src = params[0]; > > > > > > htmlOptions.width = params[1]; > > > > > > htmlOptions.wmode = params[3]; > > > > > > htmlOptions.style = ""; > > > > > > this.innerHTML = '<div > > > > > > class="clear_children">'+this.innerHTML+'</ > > > > > > div>'; > > > > > > htmlOptions.height = this.firstChild.offsetHeight; > > > > > > > > > > > > $this.addClass('').prepend($.fn.flash.transform(htmlOptions)); > > > > > > //////////////////////////////////////////////////////////// > > > > > > //////there is probly a better way to target come back to (try not > > > > > > to > > > > > > use .clear_childern) swicth to $this???? > > > > > > //////////////////////////////////////////////////////////// > > > > > > $ > > > > > > (this).contents("[nodeType=1]").not(".clear_children").addClass("sizeME"); > > > > > > var self = this; > > > > > > > function doSomething() { > > > > > > var NEWheight = self.childNodes[1].offsetHeight; > > > > > > $ > > > > > > (this).contents("[nodeType=1]").not(".clear_children").height(NEWheight > > > > > > +'px'); > > > > > > }; > > > > > > //////////////////////////////////////////////////////////// > > > > > > //////////////////////////////////////////////////////////// > > > > > > var resizeTimer = null; > > > > > > $(window).bind('resize', function() { > > > > > > if (resizeTimer) clearTimeout(resizeTimer); > > > > > > resizeTimer = setTimeout(doSomething, 3); > > > > > > }); > > > > > > }); > > > > > > }); > > > > > > > }); > > > > > > > this was the way it was.... Which worked... > > > > > > > $('.Round2').each(function() {var $this = $(this); > > > > > > var params = $(this).attr('rel').split(':'); > > > > > > $(this).flash({flashvars: { > > > > > > right_off : ['' + params[4] + ''], > > > > > > left_off : ['' + params[5] + ''] > > > > > > .join(' ') > > > > > > }}, { version: 8 }, function(htmlOptions) { > > > > > > > var $this = $(this); > > > > > > var params = $(this).attr('rel').split(':'); > > > > > > htmlOptions.src = params[0]; > > > > > > htmlOptions.width = params[1]; > > > > > > htmlOptions.wmode = params[3]; > > > > > > htmlOptions.style = ""; > > > > > > this.innerHTML = '<div > > > > > > class="clear_children">'+this.innerHTML+'</ > > > > > > div>'; > > > > > > htmlOptions.height = this.firstChild.offsetHeight; > > > > > > > $this.addClass('').prepend($.fn.flash.transform(htmlOptions)); > > > > > > //////////////////////////////////////////////////////////// > > > > > > //////there is probly a better way to target come back to (try not > > > > > > to > > > > > > use .clear_childern) swicth to $this???? > > > > > > //////////////////////////////////////////////////////////// > > > > > > $ > > > > > > ('.Round2').contents("[nodeType=1]").not(".clear_children").addClass("targetME2"); > > > > > > var self2 = this; > > > > > > function doSomething2() { > > > > > > var NEWheight2 = self2.childNodes[1].offsetHeight; > > > > > > $ > > > > > > ('.Round2').contents("[nodeType=1]").not(".clear_children").height(NEWheight2+'px');}; > > > > > > > //////////////////////////////////////////////////////////// > > > > > > //////////////////////////////////////////////////////////// > > > > > > var resizeTimer2 = null; > > > > > > $(window).bind('resize', function() { > > > > > > if (resizeTimer2) > > ... > > read more »- Hide quoted text - > > - Show quoted text -