[jQuery] Re: Fade in background image.

2008-07-08 Thread lamy


Hm, good idea. I'm gonna try it tomorrow.



-- 
View this message in context: 
http://www.nabble.com/Fade-in-background-image.-tp18336552s27240p18345124.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Fade in background image.

2008-07-08 Thread lamy


Hi there!

I'd like to create an effect like the one on the jquery Ui website. Someone
hovers over an item and is changes its background color smoothly.

This is how far I've got: 

$(".actionmenu").mouseover(function(){
if($(this).css("background-image").length <= 4)
{
var obj = $(this).clone(true);

obj.insertAfter(this).hide().css({"background-image":"url(IMAGE)","background-repeat":"repeat-y"});
$(this).hide();
obj.fadeIn();
}
});

$(".actionmenu").mouseout(function(){
if($(this).css("background-image").length > 4)
{
$(this).hide();
$(this).prev("div").fadeIn();
}
});

It works.
The problem is, that if the user hovers too quickly, the js code can't keep
up with cloning and fading in  that div so that the item vanishes. Check
yourself: http://inaustralia.de/fcms/admin.php

user/pass:operator


Any solutions?
-- 
View this message in context: 
http://www.nabble.com/Fade-in-background-image.-tp18336552s27240p18336552.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Loading google maps dynamically

2008-06-18 Thread lamy

Hey there!

Yeah, that's pretty obvious - and I already use a "plugin" from
http://olbertz.de/blog/?p=jquery_googlemaps.

The only problem is - as I said- that I am being redirected to the
script...

On 18 Jun., 22:25, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> It looks like you're getting the script ok, but there is other stuff
> you need to do to create a google map. There are a couple of good
> jQuery googlemap plugins (eg, jMaps)
>
> So you'd do something like this:
>
> $("#togglegmaps").toggle(
>     function(){
>         $.getScript("http://maps.google.com/maps?
> file=api&v=2&kexQRunjaLdXZDSuOjYlX_LT10f8SsQ",
>             function(){
>                 $("#gmapsdiv").gmap(); // or whatever the method is to
> create a google map from a div
>                 $("#gmapsdiv").fadeIn("slow");
>             })
>         },
>     function(){$(".gmapsdiv").fadeOut("slow");
>
> });
>
> Note that I'd avoid the fade ins and outs though - googlemaps still
> needs to load all sorts of images and pieces before it's ready to be
> shown. It might be better just to .show() it.
>
> On Jun 19, 1:47 am, lamy <[EMAIL PROTECTED]> wrote:
>
> > Hey guys!
> > I just startet using jQuery a couple days ago - it totally rocks!
>
> > Now, I want to give people who write in my blog the opportunity to add
> > some google maps stuff.
> > So I have a  - element which can be shown or hidden by pressing a
> > button. I want google maps to load ONLY when the button is being
> > clicked. I tried $.getscript(), but apparently he tries to redirect
> > me. What am I doing wrong?
>
> > Help would very much be appreciated! :)
>
> > This is the code:http://pastebin.org/4
>
> > What's wrong about that?
>
> > Cheers guys.


[jQuery] Add script dynamically?

2008-06-18 Thread lamy

Hey there! This might be a double post, but I can't find my recent
entry regarding the same topic!

So, once again :)

When I try to load google maps dynamically with $.getscript() with a
click on a button, the script tries to redirect me for some reason.
What am I doing wrong? Please help, I've been stuck on this for hours :
(



This is my code: http://pastebin.org/4

Cheers guys :)
lamy.


[jQuery] Loading google maps dynamically

2008-06-18 Thread lamy

Hey guys!
I just startet using jQuery a couple days ago - it totally rocks!

Now, I want to give people who write in my blog the opportunity to add
some google maps stuff.
So I have a  - element which can be shown or hidden by pressing a
button. I want google maps to load ONLY when the button is being
clicked. I tried $.getscript(), but apparently he tries to redirect
me. What am I doing wrong?

Help would very much be appreciated! :)

This is the code:
http://pastebin.org/4

What's wrong about that?

Cheers guys.