• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
seegatesite header

Seegatesite.com

Seegatesite.com - Programming Tutorial , Sharing , How and Learn Together

  • TOOLS
    • Bootstrap Navbar Online Generator
    • Customize Sidebar Menu Bootstrap 3
    • Bootstrap Demo
  • ADVERTISE
  • CATEGORIES
    • Android
    • Blogging Tips
    • Database
    • CSS
    • Info Gadget
    • Javascript
    • Linux
    • PHP
    • Various
    • WordPress
  • Q&A
  • PHP
  • JAVASCRIPT
  • JQUERY
  • ANGULAR
  • WORDPRESS
  • SEO
  • REACT
🏠 » CSS » Change Bootstrap Modal Dialog Effect With Animate.css

Change Bootstrap Modal Dialog Effect With Animate.css

By Sigit Prasetya Nugroho ∙ April 3, 2017 ∙ CSS ∙ 4 Comments

Share : TwitterFacebookTelegramWhatsapp

Changing a bootstrap modal dialog effect is very easy to do with animate.css. If you are bored with the standard bootstrap effect, animate.css is the best and lightweight solution to be applied with your web application.

Animate.css is an animated CSS owned by Daniel Eden that can be combined with bootstrap framework without reducing performance.

So that animation can work well you need to add the following CSS code:

1
2
3
4
5
.modal.fade .modal-dialog {
-webkit-transform: translate(0);
-moz-transform: translate(0);
transform: translate(0);
}

Change Bootstrap Modal Dialog Effect With Animate.css
Bootstrap Modal Window With Animation Example

To change the standard animation from bootstrap modal form, it is necessary to add a javascript modal event. As an example, I will add animation flipInX when modal dialog called and will add animation flipOutY when the modal dialog is closed.

1
2
3
4
5
6
  $('.modal').on('show.bs.modal', function (e) {
   $('.modal .modal-dialog').attr('class', 'modal-dialog  flipInX  animated');
  })
  $('.modal').on('hide.bs.modal', function (e) {
   $('.modal .modal-dialog').attr('class', 'modal-dialog  flipOutX  animated');
  })

Jquery script above will change the value of class attributes in the .modal and .modal-dialog class. Whereas bootstrap dialog event executed is show.bs.modal and hide.bs.modal.

Bootstrap Modals Dialog Event

Bootstrap modal dialog has a few events that can be executed when a modal dialog invoked or closed. For more details, please visit http://getbootstrap.com/javascript/#modals-events

The tutorial is completed, it is very easy to change the animation or effects on the bootstrap modal dialog.

Thus my article about Change Bootstrap Modal Dialog Effect With Animate.css, hopefully useful 🙂

Another CSS Related Post :

  • Free Simple Admin Dashboard Bootstrap 4 By Seegatesite
  • 4 Best Sites To Download School And Education Icons Sets
  • How to Make a Shake Effect Validation Like the WordPress Login Form
  • [CSS] How To Fixed Select2 Responsive Width
  • Upgrade Responsive Bootstrap Table Using Footable Plugin
  • How To Centering And Make Full Width Youtube Iframe On Blog Article

Avatar for Sigit Prasetya Nugroho

About Sigit Prasetya Nugroho

This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Reader Interactions

Comments

  1. Avatar for Ernesto MaldonadoErnesto Maldonado says

    January 31, 2018 at 1:49 am

    Hi there, here a little sugestion about the code, this is because with the .attr() you are setting the class and removing previous attributes for class, this is my suggestion:

    $(‘.modal’).on(‘show.bs.modal’, function (e) {
    $(‘.modal .modal-dialog’).addClass(‘flipInX animated’);
    setTimeout(function () {
    $(‘.modal .modal-dialog’).removeClass(‘flipInX animated’);
    },700);
    });
    $(‘.modal’).on(‘hide.bs.modal’, function (e) {
    $(‘.modal .modal-dialog’).addClass(‘flipOutX animated’);
    setTimeout(function () {
    $(‘.modal .modal-dialog’).removeClass(‘flipOutX animated’);
    },700);
    });

    Now the previous classes aren’t touched anymore whit the .addClass() and .removeClass() JQuery functions.

    Reply
    • Avatar for Sigit Prasetya NugrohoSigit Prasetya Nugroho says

      January 31, 2018 at 4:06 am

      thanks 🙂

      Reply
  2. Avatar for David BartleyDavid Bartley says

    June 12, 2018 at 7:39 am

    This was really useful for me – many thanks.

    Reply
  3. Avatar for miguelmiguel says

    August 13, 2020 at 5:25 am

    does not work for modal-xl

    Reply

Leave a Reply Cancel reply

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

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Welcome to my Home,

Avatar for miguelThis site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.



Popular Articles

Checked checkbox AdminLTE Bootstrap in Jquery

November 4, 2014 By Sigit Prasetya Nugroho 7 Comments

Simple create date format validation with jqueryUI

December 21, 2014 By Sigit Prasetya Nugroho Leave a Comment

Create Simple Progress Bar for Fake Online Generator with Jquery

January 10, 2015 By Sigit Prasetya Nugroho Leave a Comment

22+ Coolest Free Jquery Plugin For Premium Theme

October 3, 2015 By Sigit Prasetya Nugroho Leave a Comment

Easy Build Your Anti Copy Paste Plugin

October 6, 2015 By Sigit Prasetya Nugroho Leave a Comment

Popular Tags

adminlte (15) adsense (13) adsense tips (4) affiliate amazon (13) amazon (12) Android (8) angular (16) angular 4 (12) angular 5 (4) asin grabber (3) Bootstrap (27) codeigniter (5) create wordpress theme (5) crud (8) css (6) free wordpress theme (7) google adsense (4) imacros (4) increase traffic (6) jquery (34) laravel (10) laravel 5 (5) learn android (5) modal dialog (5) mysql (6) nodeJs (4) optimize seo (4) pdo (6) php (30) plugin (53) pos (7) Publisher Tips (5) react (3) Reactjs (7) SEO (37) theme (17) tutorial angular (5) tutorial angular 4 (6) tutorial javascript (10) tutorial javascript beginners (4) twitter (3) widget (3) wordpress (18) wordpress plugin (13) XMLRPC (5)




  • About
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions

©2021 Seegatesite.com