Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Web Design (WordPress, Joomla, etc.) colorFade in Javascript

  • colorFade in Javascript

    Posted by Liam King on August 16, 2011 at 9:55 pm

    Hi all,

    I’m currently trying to change a little piece of javascript in a website I’m updating for a friend, however, javascript has never been my best side.

    There are some images that when you scroll over them, they animate with a fade to mid-opacity black.

    I think I have found the bit of script that controls this, but can’t figure out how to change it so that it fades to color instead.

    $(‘div.profile,div.profilename’).hover(function(){
    $(this).children(‘.profile,.profilename’).stop().fadeTo(150, 0.6);

    },function(){
    $(this).children(‘.profile,.profilename’).stop().fadeTo(150, 0);
    });

    I read that I need to put in “colourFade” instead of “fadeTo” – but it doesn’t work.

    I’d be grateful for any help!
    Thanks!

    Curtis Thompson replied 14 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Curtis Thompson

    August 22, 2011 at 12:48 am

    hello…

    outside of the context of the full page you’re working on, it’s hard to give you a concrete answer. can you post a sample somewhere for us to see?

    sitruc

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy