[jQuery] How can a get an image's dimension AFTER animation

2009-11-16 Thread nabrown78
I am animating an image's height. Afterwards, I want to know the image's width. The following code gives the image's width prior to the animation. function growBigger(element) { var myWidth = $(element) .find("img") .animate(

[jQuery] Re: IE iframe bug? Attributes not available on $(document).ready - any advice?

2009-05-20 Thread nabrown78
Just to note, maybe the problem is related to "document.ready firing too early within iframe ": http://groups.google.com/group/jquery-dev/browse_thread/thread/460f3f6a6bf0b61/1f7ae233a9485450 ?

[jQuery] IE iframe bug? Attributes not available on $(document).ready - any advice?

2009-05-20 Thread nabrown78
Hi all, I have a problem which is well over my JQuery/javascript head. I have a page (http://www.norabrowndesign.com/new_site/portfolio/ websites/index.html) in which you can click on any thumbnail and up pops an iframe, using the thickbox plugin. The iframe loads a new html document (for example

[jQuery] Re: IE7 returning 0 for attr("width") on an img with width set

2009-03-25 Thread nabrown78
But for that you have to wait until all the images have actually loaded. I thought it would be faster to get the attribute. Is that wrong? On Mar 25, 11:39 am, MorningZ wrote: > Use > > this_img.width() > > instead > > http://docs.jquery.com/CSS/width > > On Mar 25,

[jQuery] Re: IE7 returning 0 for attr("width") on an img with width set

2009-03-25 Thread nabrown78
Aha! The problem was that the li elements which contained the images were set to display:none in the CSS. I guess I can work around that. On Mar 25, 10:47 am, nabrown78 wrote: > Hi All, I have the following code: > > $('#slides img').each(function(i){//calcula

[jQuery] IE7 returning 0 for attr("width") on an img with width set

2009-03-25 Thread nabrown78
Hi All, I have the following code: $('#slides img').each(function(i){//calculate margins and wrap var this_img = $(this); var imgMargin = Math.round((550 - (this_img.attr("width") + 35))/2) + 5; this_img.wrap(''); $('#content').appe

[jQuery] Re: Best way to preload an image to obtain dimensions

2009-01-10 Thread nabrown78
ht stored in local variable "imgHeight" */ >                      }) >                      .attr({src: path, title: alt}); >                 }); >             }); >              img.attr('src', path); >    }); > > }); > > It *should* preload your images, and set up the correct onclick events > to

[jQuery] Re: Best way to preload an image to obtain dimensions

2009-01-10 Thread nabrown78
ored in local variable "imgHeight" */ >                      }) >                      .attr({src: path, title: alt}); >                 }); >             }); >              img.attr('src', path); >    }); > > }); > > It *should* preload your images, and set up

[jQuery] Re: Best way to preload an image to obtain dimensions

2009-01-10 Thread nabrown78
ee it action on my test page: http://www.kidsthinkbig.com/slideshows_test.htm The top padding for the image correctly adjusts based on the image height (check the source for the full javascript I'm using). On Jan 8, 9:06 pm, brian wrote: > On Thu, Jan 8, 2009 at 6:06 PM, nabrown78 wrote:

[jQuery] Best way to preload an image to obtain dimensions

2009-01-08 Thread nabrown78
Hi All, I am building a simple little gallery where you click on a thumbnail, and a larger image displays on the same page. I was trying to adjust the padding around the large image using the new image's dimensions. I pieced together this image preloading code (see below), but I don't fully unders

[jQuery] Re: Question about :contains filter

2008-09-06 Thread nabrown78
Well, this proved an intractable problem - something relating to encoding that was over my head. I found a work-around though, using filter to find the list items containing "ladies" and "short-sleeve" thus leaving out the darn apostrophe altogether: $("li:contains(ladies)

[jQuery] Re: Question about :contains filter

2008-09-06 Thread nabrown78
"escape()"-ing and "encodeURI()"-ing the apostrophe and that didn't work either. I wonder if there's a wild-card character I can just stick in there instead? Thanks, Nora On Sep 5, 12:16 pm, Ca-Phun Ung <[EMAIL PROTECTED]> wrote: > nabrow

[jQuery] Question about :contains filter

2008-09-05 Thread nabrown78
I am trying to select a list element that contains the text "ladies’ short-sleeve tee". I have tried $("li:contains(ladies' short-sleeve tee)").addClass("selected"); $("li:contains('ladies\' short-sleeve tee')").addClass("selected"); $("li:contains(ladies’ short-sleeve tee)").addClass("selected")