[jQuery] Re: Resize an element without affecting the layout

2008-11-22 Thread ricardobeat
The problem is if you hover the upper part of the image, you move it away from under the cursor, firing the mouseleave, and during the animation it goes back under the cursor firing mouseenter. Make sure the image is still under the hovered position during all effects. - ricardo On Nov 21, 8:07 

[jQuery] Re: Resize an element without affecting the layout

2008-11-21 Thread vani
I made some progress as you can see here: http://tinyurl.com/645ow4 , but I've ran into problem with jquery hover function. Its over and out functions fire too many times while the cursor is still over the same image. That happens only if I use the animate effect inside the over function, if I

[jQuery] Re: Resize an element without affecting the layout

2008-11-21 Thread Liam Potter
rather then using hover try binding the mouseenter and mouseleave events to it. $(img).bind(mouseenter, function () { animate stuff }); $(img).bind(mouseleave, function () { back to normal }); vani wrote: I made some progress as you can see here: http://tinyurl.com/645ow4 , but I've ran

[jQuery] Re: Resize an element without affecting the layout

2008-11-21 Thread vani
I have thus far tried the hover, mouseover/out, and bind methods with pretty much the same effect, over and out happen unexpectedly... On 21 stu, 11:14, Liam Potter [EMAIL PROTECTED] wrote: rather then using hover try binding the mouseenter and mouseleave events to it.

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter
is the div necessary? Try taking it out. vani wrote: Thanks for replying, but I'm still having trouble making it work. I tried to set the table to relative and img to absolute but it didn't work as intended. This is the layout of the table: table tr tddivimg //div/td tddivimg //div/td tddivimg

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread vani
I've taken out the div, but it doesn't matter because as soon as I change the images positioning to absolute they change their top/left coordinates to the center of the cell, like this: http://tinyurl.com/5vmb42 On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED] wrote: is the div necessary? Try

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter
set the css on them to this position:absolute; top:0; left:0; vani wrote: I've taken out the div, but it doesn't matter because as soon as I change the images positioning to absolute they change their top/left coordinates to the center of the cell, like this: http://tinyurl.com/5vmb42 On 20

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Ivan Svaljek
If I do that, they all pile up on each other at the top/left corner of the table, like this: http://tinyurl.com/5tdmgm On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter [EMAIL PROTECTED]wrote: set the css on them to this position:absolute; top:0; left:0; vani wrote: I've taken out the div,

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter
make sure you have made the td position:relative Ivan Svaljek wrote: If I do that, they all pile up on each other at the top/left corner of the table, like this: http://tinyurl.com/5tdmgm On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread vani
That made it work in IE, but firefox and opera exhibit serious problems with it. Firefox sets the top/left to document top/left, and opera sets it to table top/left, only IE sets it to cell's top/left. On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED] wrote: make sure you have made the td

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Ivan Svaljek
Here is the link, but it changes often: http://tinyurl.com/634p9s On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]wrote: do you have a live example I can see? vani wrote: That made it work in IE, but firefox and opera exhibit serious problems with it. Firefox sets the

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter
ok, got it. Un comment the div in the td, and apply the position relative to that. for some reason position relative doesn't seem to work on a table cell. Ivan Svaljek wrote: Here is the link, but it changes often: http://tinyurl.com/634p9s On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread vani
That's it, weehee! Now if only I could somehow position the center of the images to coincide with the center of parent cell? Any ideas on that one, and perhaps compatible with jquery animated resize? On 20 stu, 12:43, Liam Potter [EMAIL PROTECTED] wrote: ok, got it. Un comment the div in the

[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter
erm, best way to explain is to show an example. lets say the image is 400x400 to get it in the center you will need to set top and left to half that. top:-200px; left:-200px; If I'm right this should work, and you can use this in jquery animate. vani wrote: That's it, weehee! Now if only

[jQuery] Re: Resize an element without affecting the layout

2008-11-19 Thread Liam Potter
use absolute positioning and set the parent element to relative. vani wrote: Is it possible to create an animated resize of an element without affecting the layout of the parent element table? I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if necessary.

[jQuery] Re: Resize an element without affecting the layout

2008-11-19 Thread vani
Thanks for replying, but I'm still having trouble making it work. I tried to set the table to relative and img to absolute but it didn't work as intended. This is the layout of the table: table tr tddivimg //div/td tddivimg //div/td tddivimg //div/td /tr /table ...I'm trying to resize the img

[jQuery] Re: Resize an element without affecting the layout

2008-11-19 Thread Karl Rudd
Tables at difficult beasts, they're built to expand with their content. If you want an image that is in a table cell to (appear) to expand over the top of (and outside the bounds of) the cell then you'll have to something like: - duplicate the image element - insert the duplicate image