The code looks fine. When you say that "nothing works", does that mean
even clicking the input field does not do the popup message?
Have you tried putting an alert in the click callback to see if it
executes?

Also, instead of click, you might want to consider using 'focus'.
Focus means the text cursor is in the field, whether the user clicked
into it or used the tab button on the keyboard to navigate to it. It's
a complement to blur, which is when the text cursor leaves the field.

On Apr 16, 8:49 am, Rick <r...@marketingease.com> wrote:
> I have this code:
>
> var closed = false;
> $(document).ready(function(){
>         $('#FirstName').click(function(){
>                 if (closed == false) {
>                         $('#popUpMessage').fadeIn('fast');
>                 }
>         });
>         $('#FirstName').blur(function(){
>                 $('#popUpMessage').fadeOut('slow');
>         })
>         $('#popUpMessageClose').click(function(){
>                 closed = true;
>                 $('#popUpMessage').fadeOut('slow');
>         })
>
> });
>
> As is, nothing works.. I have this on a field input like so...
>
> <input type="text" name="FirstName" id="FirstName" size="20"
> maxlength="128" />
>
> when clicked it shows the hidden div "popUpMessage".. And on blur it
> hides it.. Inside that "popUpMessage" div I placed a small div for a
> close button named "popUpMessageClose".. What Im trying to do is hide
> that popUpMessage div permanently if the close div is clicked.. Any
> ideas where Im going wrong??

Reply via email to