mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Should add a visual test for the standard show/hide method to make sure we don't break it by overriding it
This commit is contained in:
parent
2ad1cf3319
commit
0b18671d28
@ -174,6 +174,12 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="effect" id="hide">
|
||||
<p>hide/show (jQuery)</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
$(function() {
|
||||
var duration = 1000, wait = 500;
|
||||
|
||||
$("div.effect")
|
||||
.hover(function() { $(this).addClass("hover"); },
|
||||
@ -13,16 +14,25 @@ $(function() {
|
||||
|
||||
$(el).bind("click", function() {
|
||||
|
||||
$(this).addClass("current").hide(n, o, 1000, function() {
|
||||
$(this).addClass("current").hide(n, o, duration, function() {
|
||||
var self = this;
|
||||
window.setTimeout(function() {
|
||||
$(self).show(n, o, 1000, function() { $(this).removeClass("current"); });
|
||||
},500);
|
||||
$(self).show(n, o, duration, function() { $(this).removeClass("current"); });
|
||||
}, wait);
|
||||
});
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$("#hide").click(function() {
|
||||
var el = $(this);
|
||||
el.addClass("current").hide(duration, function() {
|
||||
setTimeout(function() {
|
||||
el.show(duration, function() { el.removeClass("current") });
|
||||
}, wait);
|
||||
})
|
||||
})
|
||||
|
||||
effect("#blindHorizontally", "blind", { direction: "horizontal" });
|
||||
effect("#blindVertically", "blind", { direction: "vertical" });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user