I am using gem "bootstrap-sass", "~> 2.3.0.0"
, which means that I am using Bootstrap 2
. The modal is documented here.
My own modal starts like this:
#Modal.modal.hide.fade{"aria-hidden" => "true", "aria-labelledby" => "jobsModalLabel", :role => "dialog", :tabindex => "-1"}
I open my modal like this:
$("#Modal").modal().css "margin-left": ->
-($(@).width() / 2)
I would like to have it load faster, but I can't read from the documentation how to control the delay time. I have tried to remove the .fade
class from my modal, but that speeds to loading up too much. So I need to keep the fade functionality, but just make it faster.
Not sure if this is a js or css problem. I suppose it can be solved both ways, but I don't know how.
When I overwrite my .fade
class with the below, my fading does not speed up:
.fade {
opacity: 0;
-webkit-transition: opacity 0.01s linear;
-moz-transition: opacity 0.01s linear;
-ms-transition: opacity 0.01s linear;
-o-transition: opacity 0.01s linear;
transition: opacity 0.01s linear;
}
If I increased to e.g. 3.00s
, it slows down though...
It seems like .fade
has to do with the process of adding backdrop. I wish to speed up the process of the modal traveling from the top of the screen to its final position. This process happens after the backdrop is added.