how to toggle between bootstrap's navbar-default and navbar-inverse with a fade using jquery -


i'm trying toggle default/inverse nav bars in bootstrap, can't fade going between them. ideas?

// toggle default/inverse navbar $('#inverse-toggle-button').click(function() {     $('#top-navbar').toggleclass('navbar-inverse navbar-default', 1000);  }); 

http://jsfiddle.net/waspinator/65wlg/

you can include jquery ui to animate css change over:

<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" /> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> 

updated fiddle


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -