I am having problems getting the easing property of the toggleClass
to work. I have searched on this site and others, but still cannot get it to work as expected. The class is being toggled just fine, but it does not ease in or out smoothly.
Here is my code sample: DEMO
Here are (all) the scripts I'm loading in my project:
<!-- Scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
I have a sneaky suspicion it has something to do with the scripts I'm loading (or maybe not loading?) because I've reviewed the code several times and compared it directly to the jQuery docs. I'm also very new to jQuery.
What I'm trying to accomplish is something similar to a clamshell effect. On page load the <div>
is either being displayed or hidden depending on a value taken from the database and the checkbox is meant to toggle the <div>
open or closed.
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
in an attempt to get this working, it wasn't there before. If you look at my DEMO I have loaded jQuery core and UI, but the effect still doesn't work. – Grebe