[jQuery] Re: Slide to fade, can you help me quick? Noob alert!

2009-05-17 Thread Jere

Try this:

$(document).ready(function(){
$(.loginToggle).click(function(){
$(#loginForm).toggle(slow);
});

});

Is not only fading, but more or less i think is what you need.


[jQuery] Re: Slide to fade, can you help me quick? Noob alert!

2009-05-17 Thread waseem sabjee
$(document).ready(function(){
   $(.loginToggle).click(

 function(){
$(#loginForm).*slideToggle*(slow);
});

 });



On Sun, May 17, 2009 at 5:21 AM, Jere jg13...@gmail.com wrote:


 Try this:

 $(document).ready(function(){
$(.loginToggle).click(function(){
$(#loginForm).toggle(slow);
});

 });

 Is not only fading, but more or less i think is what you need.



[jQuery] Re: Slide to fade, can you help me quick? Noob alert!

2009-05-16 Thread mkmanning

You can make your own:

jQuery.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);
};

Probably a little beyond you right now, but study it and check out the
docs.

HTH :)

On May 16, 9:50 am, Sobering stefan.sober...@gmail.com wrote:
 Hey guys,

 I'm building a site for the company I work at. I'm a pretty
 experienced web designer and coder (as far as standards compliant html/
 css goes), but I'm a complete noob to javascript  jQuery, but I'm
 trying.

 I found this snippet of code online:

 $(document).ready(function(){
         $(.loginToggle).click(function(){
                 $(#loginForm).slideToggle(slow);
         });

 });

 Right now, as you can probably tell, when you click the link with the
 class .loginToggle it slides open the div with the ID #loginForm form
 which is set to display: none; by default. What I want it to do
 instead of sliding is fading in and out when the link is clicked.

 In the current code it says slideToggle, so being the noob I am, I
 tried changing it to fadeToggle with no success. I'm pretty positive
 that this should be an easy solution.

 I'd highly appreciate any help you guys can give!

 Cheers, Sobering


[jQuery] Re: Slide to fade, can you help me quick? Noob alert!

2009-05-16 Thread mkmanning

Btw, you could also combine both effects:

jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle', height: 'toggle'}, speed,
easing, callback);
};

On May 16, 9:49 pm, mkmanning michaell...@gmail.com wrote:
 You can make your own:

 jQuery.fn.fadeToggle = function(speed, easing, callback) {
    return this.animate({opacity: 'toggle'}, speed, easing, callback);

 };

 Probably a little beyond you right now, but study it and check out the
 docs.

 HTH :)

 On May 16, 9:50 am, Sobering stefan.sober...@gmail.com wrote:

  Hey guys,

  I'm building a site for the company I work at. I'm a pretty
  experienced web designer and coder (as far as standards compliant html/
  css goes), but I'm a complete noob to javascript  jQuery, but I'm
  trying.

  I found this snippet of code online:

  $(document).ready(function(){
          $(.loginToggle).click(function(){
                  $(#loginForm).slideToggle(slow);
          });

  });

  Right now, as you can probably tell, when you click the link with the
  class .loginToggle it slides open the div with the ID #loginForm form
  which is set to display: none; by default. What I want it to do
  instead of sliding is fading in and out when the link is clicked.

  In the current code it says slideToggle, so being the noob I am, I
  tried changing it to fadeToggle with no success. I'm pretty positive
  that this should be an easy solution.

  I'd highly appreciate any help you guys can give!

  Cheers, Sobering