Hi Ricardo,

I'm not sure why I said this was working last week, but it doesn't seem to
be! I must have been drunk at the time :)

Sorry to keep bothering you, but when I click on the link, nothing happens
now. I've tried placing alerts and so forth and I've tracked it down to this
line as the problem (I think):

    thiz.stop(true,true).fadeIn();

I'm not good enough at Javascript to debug this, been trying for a while.
Here is the full code again:

$.fn.fadeToggle = function(){
       var thiz = $(this);
       return thiz.is(':visible') ? thiz.stop(true,true).fadeOut() :
    thiz.stop(true,true).fadeIn();
};
$(function() {
    $("#signInForm").addClass("hide");
    $("#profileLinks li.userEmail strong").hover(function(){
               $(this).addClass('hover');
             }, function() {
               $(this).removeClass('hover');
           }).click(function(){
               $("#signInForm").fadeToggle();
            });
});


Any help would be appreciated, I'm stuck!



2008/11/19 Paul Collins <[EMAIL PROTECTED]>

> That works perfectly, thanks Ricardo, really appreciate it.
>
> Thanks for taking the time
> Paul
>
>
> 2008/11/19 ricardobeat <[EMAIL PROTECTED]>:
> > IDs should be unique, so there's no point in having all those
> > selectors. You can also chain the methods for <strong>, saves you time
> > from finding the element again.
> >
> > For the 'slide' effect there is a toggle function (slideToggle), but
> > you'll have to implement your own for a fade effect:
> >
> > $.fn.fadeToggle = function(){
> >    var thiz = $(this);
> >    return thiz.is(':visible') ? thiz.stop(true,true).fadeOut() :
> > thiz.stop(true,true).fadeIn();
> > };
> >
> > $(function() {
> >        $("#signInForm").addClass("hide");
> >        $("#profileLinks li.userEmail strong").hover(function(){
> >                   $(this).addClass('hover');
> >                 }, function() {
> >                   $(this).removeClass('hover');
> >               }).click(function(){
> >                   $("#signInForm").fadeToggle();
> >                });
> > });
> >
> > - ricardo
> > On Nov 19, 10:10 am, "Paul Collins" <[EMAIL PROTECTED]> wrote:
> >> Hi all,
> >>
> >> I'm trying to make something fade in and out when I use "toggleClass"
> >> to show and hide. I've been looking around for a while and can't see
> >> if it's possible. Here is my code:
> >>
> >> $(function() {
> >>         $("#topArea ul#profileLinks li.userEmail
> form#signInForm").addClass("hide");
> >>         $("#topArea ul#profileLinks li.userEmail
> strong").hover(function(){
> >>                 $(this).addClass('hover');
> >>                 }, function() {
> >>                         $(this).removeClass('hover');
> >>                 $("#topArea ul#profileLinks li.userEmail
> strong").click(function(){
> >>                                 $("#topArea ul#profileLinks li.userEmail
> >> form#signInForm").toggleClass('show');
> >>                         });
> >>                 });
> >>
> >> });
> >>
> >> Would appreciate any help.
> >> Cheers
> >> Paul
>

Reply via email to