Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6825343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:00:41+00:00 2026-05-26T22:00:41+00:00

Is there a CSS3 equivalent to .fadeToggle() in jQuery? I was googling around after

  • 0

Is there a CSS3 equivalent to .fadeToggle() in jQuery?

I was googling around after seeing that my jq code didn’t run the smoothest on mobile devices, and wanted to transform my already existing code into CSS3 animations (parts of it).

In my code below, it calls .fadeToggle() towards the bottom. I read an article saying it was possible to call CSS3 effects via jQuery: http://awardwinningfjords.com/2011/05/06/trigger-css3-animations-with-jquery.html

$(function () {
    function a(a) {
        a.each(function () {
            var b, c;
            a = $(this);
            b = a.find("a.toggle");
            c = a.find("div");
            b.click(function (a) {
                a.preventDefault();
                c.stop(false, true).slideToggle(300);
            });
        });
    }
    a($("div.container"));
});
$(document).ready(function () {
    $(".toggle_overlay").click(function () {
        $(".widget_overlay").fadeToggle();
    });
});

Is there a CSS3 equivalent?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:00:42+00:00Added an answer on May 26, 2026 at 10:00 pm

    The effect you are creating (clicking a div shows/hides it) isn’t possible with purely CSS. There isn’t any way to bind click events like that (well, unless you count the :focus pseudo class on input fields).

    However, the CSS transition would function if you used JQuery to toggle a class (.active, for example). JSFiddle here. However, this is actually not such a good way to handle fading in and out, since JQuery does a lot of work behind the scenes to handle different browsers and their specific implementations of opacity. But, if you were doing something like changing the width of a div, it’s great, because it lets you keep all your styling in the CSS and the logic contained to the Javascript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there a version of css3 code below that will work in all browers?
The thing I hate most in CSS3 is that there is always two properties
Is there any JavaScript or CSS framework that adds CSS3 support to IE6, like
Is there a way to read CSS3 values with jQuery? I've tried just using:
Is there a way in jQuery to animate the css3 border-radius property available in
First of all, I'm fairly new to jQuery and HTMl5/CSS3, so while there is
Is there a way to have CSS3 transitions/animations for a div that's just been
Are there any alternatives to the :not css3 selector that are compliant with IE8
Are there any techniques that allow for expressions in css3 statements? Frequently it is
Is there a javascript framework out there that will use CSS3 Transitions for effects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.