Skip to content
Youths Forum Youths Forum Youths Forum

Tech Blogs & Programming Tutorials

Youths Forum Youths Forum Youths Forum

Tech Blogs & Programming Tutorials

  • Blog
  • News
  • Programming
    • PHP
    • JavaScript
    • JQuery
    • CSS
    • HTML
    • API
  • Stock Market Live
  • Automobiles
    • Cars
  • Gadgets
    • Phones
    • Android Phones

Categories

  • Automobiles (12)
    • Cars (7)
  • Blog (103)
    • Poems (2)
    • Space (2)
  • Command (2)
  • Education (2)
  • Entertainment (4)
  • Gadgets (9)
    • Phones (8)
      • Android Phones (4)
  • HTML Templates (11)
  • IT Training Institutes (1)
  • Lifestyle (4)
  • News (51)
  • Others (23)
  • Programming (296)
    • API (16)
    • CSS (83)
    • Database (4)
    • Hosting (1)
    • HTML (37)
    • JavaScript (117)
      • JQuery (27)
      • ReactJS (7)
    • PHP (116)
  • Python (3)
  • recipes (1)
  • SEE Result (1)
  • Server (3)
  • Blog
  • News
  • Programming
    • PHP
    • JavaScript
    • JQuery
    • CSS
    • HTML
    • API
  • Stock Market Live
  • Automobiles
    • Cars
  • Gadgets
    • Phones
    • Android Phones
Close

Search

JQuery

Flip/Animate Cards using JQuery

By Admin
January 13, 2021 3 Min Read
0

In this article, we are going to learn to flip card block in HTML using JQuery. We will be using JQuery and plugins including wow.js , sticky.js and slick.js in order to achieve this.

 

Full Source Code :

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-js/1.3.0/sticky.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<style>
    .wrapper{
    width:50%;
    margin:0 auto;
    margin-top:100px;
    }
    .cards {
    position: relative;
    list-style-type: none;
    padding: 0;
    max-width: 100%;
    width: 100%
    }
    .card:before {
    content: "";
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 15px
    }
    .card {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    color: #fff;
    background: #cd810e;
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 0 20px #5e5e5e;
    transform: translateY(0) rotate(4deg) translateX(25px) scale(1);
    transform-origin: 0 0;
    transition: transform .6s cubic-bezier(.8, .2, .1, .8) .1s, background .4s linear;
    cursor: pointer;
    user-select: none
    }
    @media(min-width:768px) {
    .card {
    padding: 40px
    }
    }
    .card:last-child {
    margin-bottom: 0
    }
    .card--next {
    z-index: 5;
    transform: translateY(-25px) rotate(4deg) translateX(25px) scale(1)
    }
    .card--out {
    animation: card-out .6s cubic-bezier(.8, .2, .1, .8);
    transform: translateY(-50px) rotate(8deg) translateX(55px) scale(.95);
    z-index: 1;
    background: #905c0d
    }
    @keyframes card-out {
    0% {
    z-index: 20;
    transform: translateY(0px) rotate(-4deg)
    }
    50% {
    transform: translateY(-120%) rotate(-5deg) translateX(-40px)
    }
    80% {
    z-index: 1
    }
    100% {
    transform: translateY(-50px) rotate(8deg) translateX(55px) scale(.95)
    }
    }
    .card--current {
    cursor: auto;
    user-select: auto;
    position: relative;
    z-index: 10;
    opacity: 1;
    background: #fb9b09;
    transform: rotate(-1deg) translateX(0%) scale(1);
    min-height: 110px;
    }
    .card--current p {
    position: absolute;
    transform: translateX(-50%);
    left: 50%;
    font-size:28px;
    font-weight: bold;
    color:#000000;
    width: calc(100% - 80px)
    }
    .main-wrap {
    margin-top: 5rem;
    min-height: 276px
    }
    @media(min-width:768px) {
    .main-wrap {
    min-height: inherit
    }

    }
</style>
<div class="wrapper">
    <ul class="cards">
        <li class="card">
            <p>1. Introduction to Web Technology</p>
        </li>
        <li class="card">
            <p>2. Basics to HTML and CSS</p>
        </li>
        <li class="card">
            <p>3. Server Side vs Client Side Scripting</p>
        </li>
        <li class="card">
            <p>4. JavaScript and JQuery Basics</p>
        </li>
        <li class="card">
            <p>5. Setup Apache, MySQL and PHP (AMP)</p>
        </li>
        <li class="card">
            <p>6. Basics : variables, data types, functions, looping and functional statements</p>
        </li>
        <li class="card">
            <p>7. Playing with Array and Strings</p>
        </li>
        <li class="card">
            <p>8. Database Management System (DBMS) and RDBMS</p>
        </li>
        <li class="card">
            <p>9. Introduction to MySQL</p>
        </li>
        <li class="card">
            <p>10. Basic MySQL Queries</p>
        </li>
        <li class="card">
            <p>11. Advanced PHP and Object Oriented Programming (OOP)</p>
        </li>
        <li class="card">
            <p>12. JSON and XML handling in PHP</p>
        </li>
        <li class="card">
            <p>13. File Handling</p>
        </li>
        <li class="card">
            <p>14. Optimization and Debugging Techniques</p>
        </li>
        <li class="card">
            <p>15. Web Security</p>
        </li>
        <li class="card">
            <p>16. PHP Frameworks (Laravel/Zend/Codeigniter)</p>
        </li>
        <li class="card">
            <p>17. Get Change to work on Realtime Projects</p>
        </li>
        <li class="card">
            <p>18. Version Control (Git)</p>
        </li>
        <li class="card">
            <p>19. Make your websit live in production server</p>
        </li>
        <li class="card">
            <p>20. cPanel, Domain Registration, Web Hosting and FTP, Cronjobs</p>
        </li>
    </ul>
</div>
<script>
    $(document).ready(function() {
        wow = new WOW({
            boxClass: 'wow',
            animateClass: 'animated',
            offset: 0,
            mobile: false,
            live: true
        })
        wow.init();
        var sticky = new Sticky('.selector');
        $('.slider-for').slick({
            slidesToShow: 1,
            slidesToScroll: 1,
            arrows: true,
            speed: 600,
            autoplaySpeed: 5000,
            autoplay: true,
            infinite: true,
            asNavFor: '.slider-nav'
        });
        $('.slider-nav').slick({
            slidesToShow: 3,
            slidesToScroll: 1,
            asNavFor: '.slider-for',
            arrows: false,
            centerPadding: '0px',
            dots: false,
            speed: 600,
            autoplaySpeed: 5000,
            infinite: true,
            autoplay: true,
            centerMode: true,
            focusOnSelect: true
        });
        $.fn.commentCards = function() {
            return this.each(function() {
                var $this = $(this),
                    $cards = $this.find('.card'),
                    $current = $cards.filter('.card--current'),
                    $next;
                $cards.on('click', function() {
                    if (!$current.is(this)) {
                        $cards.removeClass('card--current card--out card--next');
                        $current.addClass('card--out');
                        $current = $(this).addClass('card--current');
                        $next = $current.next();
                        $next = $next.length ? $next : $cards.first();
                        $next.addClass('card--next');
                    }
                });
                if (!$current.length) {
                    $current = $cards.last();
                    $cards.first().trigger('click');
                }
                $this.addClass('cards--active');
            })
        };
        $('.cards').commentCards();
    });
</script>

 

Tags:

animateJQuery
Author

Admin

Follow Me
Other Articles
Previous

Get Youtube embed code from video URL using PHP

Next

How to wrap text around image using HTML and CSS ?

No Comment! Be the first one.

Leave a Reply

Your email address will not be published. Required fields are marked *

FIFA World Cup 2026 Predict and Win by SportsGuff

Recent Posts

  • Unpacking Nepal’s Record Rs 2.12 Trillion Budget and What It Means for You
  • How to Write a Strong Scholarship Application: The Ultimate Step-by-Step Guide
  • How to Prepare for Exams Without Stress: The Ultimate Science-Backed Guide
  • Chiranjibi Adhikari Appointed Acting President of CAN Federation
  • How to Design a Student Marksheet Using HTML and CSS

Tags

adsense ai animate animation animation using HTML and CSS API blog calculator chatgpt Cryptocurrency CSS css animation design Email Facebook featured filemanager file manager free template google htaccess HTML image Instagram interview javascript JQuery jquery ui NADA AutoShow NADA Auto Show 2024 password PHP Progressive Web App PWA QR random react reactjs Rotate travel Twitter vpn youthforum youthsforum youtube

About Us

At Youths Forum, we are passionate about sharing knowledge that empowers students, educators, professionals, and technology enthusiasts.

Our Mission

Our mission is simple: to make technology and education accessible, understandable, and beneficial for everyone. We strive to create content that helps our readers learn new skills and stay updated with industry developments.

RSS RSS

  • Unpacking Nepal’s Record Rs 2.12 Trillion Budget and What It Means for You Admin
  • How to Write a Strong Scholarship Application: The Ultimate Step-by-Step Guide Admin
  • How to Prepare for Exams Without Stress: The Ultimate Science-Backed Guide Admin

Quick Links

  • Stock Market Live
  • Parliament Election 2082
Copyright 2026 — Youths Forum. All rights reserved. Blogsy WordPress Theme