The blind effect is practically the same as the slide effect. Visually the element appears to do the same thing, and the two effects' code files are also extremely similar. The main difference between the two effects that we need worry about is that with this effect we can only specify the axis of the effect, not the actual direction.
The direction
option that this effect uses for configuration only accepts the values horizontal
or vertical
. We'll build on the last example to see the blind effect in action. Add the <script>
resource for the blind effect directly after the <script>
that refers to the effects.slide.js
file:
<script type="text/javascript" src="development-bundle/ui/effects.blind.js"></script>
Now change the handler function attached to the Cancel button, so that it appears as follows:
$("#cancel").click(function(e) {
e.preventDefault();
$("#login").effect("blind", { direction:"vertical" }, 1000, function() {
$("#loginBar"...