It depends how much control you have over the HTML.
If you have control over the HTML, one simple solution is to write the width
in another attribute of the image - something that is not re-interpreted by
IE 7.
E.g.
img src="example.jpg" width="100" hwidth="100"
and then read the value of
Just out of interest how did you work around that? I have been
battling this problem for a couple of days now!
On Mar 26, 2:30 am, nabrown78 wrote:
> 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
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, 11:47 am, nabrown78 wrote:
>
yeah, .width() gets or sets the computed width
so in your case, grabbing the attribute makes more sense for your
situation
On Mar 25, 1:38 pm, nabrown78 wrote:
> 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 th
Use
this_img.width()
instead
http://docs.jquery.com/CSS/width
On Mar 25, 11:47 am, nabrown78 wrote:
> Hi All, I have the following code:
>
> $('#slides img').each(function(i){//calculate margins and wrap
> var this_img = $(this);
> var imgMargin = Math.round((5
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){//calculate margins and wrap
>
6 matches
Mail list logo