[jQuery] Re: Image replacement

2007-11-19 Thread Wil Everts
I have tried using: $(this).find('.arrow').attr("src", "images/down.jpg"); and the opposite to replace the image source using the "arrow" class to find it. It works for the down arrow replacement but I'm clearly on the w go back to the up state... New Code: $(document).ready(function() {

[jQuery] Re: Image replacement

2007-11-19 Thread yetanother
Sorry for the double post, didn't see my original one when I returned from lunch, anyway, this message has more details. Thanks, Wil On Nov 19, 12:38 pm, "Wil Everts" <[EMAIL PROTECTED]> wrote: > I have an accordion-like setup for several divs to contract and expand when > the header text is cl

[jQuery] Re: image replacement

2007-05-07 Thread Equand
Here is the new version $('a', '.img').click(function(){ $(this).blur(); var href = $(this).attr("href"); var imgl = new Image(); if ($('img', '#preview')){ $('img', '#p

[jQuery] Re: image replacement

2007-05-07 Thread joomlafreak
Sorry I think this line isImage = $(".preview").size(); should be like this isImage = $(".preview/img").size(); joomlafreak wrote: > I am sorry but I found your code little complicated. Anyways I can > suggest something like this > > $('a').each( > function() > { >

[jQuery] Re: image replacement

2007-05-07 Thread joomlafreak
I am sorry but I found your code little complicated. Anyways I can suggest something like this $('a').each( function() { ok = $(this); href = ok.attr('rel')||''; ok.bind('click', function(){ isImage = $(".preview").si

[jQuery] Re: image replacement

2007-05-06 Thread Equand
http://nosite.ru/HU/ so as you see i figured most of it... except the transition... it bugs by displacing... and doesn't seem to work correctly, i wanted to on load of new to fade out the old and fade in the new... if you look in the code u can see this, thanx in advance

[jQuery] Re: image replacement

2007-05-06 Thread Equand
thanks, u actually helped me, but there's one point now, the image appears but doesn't load... ( i've figured from imagebox that it's better to work through rel attribute... so i've made a bind function on load $('a').each( function() { ok = $(this);

[jQuery] Re: image replacement

2007-05-06 Thread joomlafreak
On May 6, 12:38 am, Equand <[EMAIL PROTECTED]> wrote: > hi all, > i'm a newbie in javascript and jquery also. > could you please help > i'm trying to write a function to do onclick of a div called img to > change img in div called 'preview' > how do i make it replace with an image which is taken