Side navigation
#9896 closed bug (invalid)
Opened July 22, 2011 09:11PM UTC
Closed July 25, 2012 12:44AM UTC
animate border width with 'toggle' value causes element to dissappear
Reported by: | dave@sawmac.com | Owned by: | dave@sawmac.com |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | effects | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
With this code:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<style>
#test {
width: 50%;
background-color: red;
border-style: solid;
border-color: black;
border-width: 50px;
}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function() {
$('html').click(function() {
$('#test').animate({
borderLeftWidth : 'toggle'
});
});
});
</script>
</head>
<body>
<div id="test">blah</div>
</body>
</html>
On the first click, the left border animates to 0 and then the entire element dissappears. Click again and the element reappears and animates to original 50px value.
Attachments (0)
Change History (6)
Changed July 23, 2011 04:15PM UTC by comment:1
component: | unfiled → effects |
---|---|
owner: | → dave@sawmac.com |
priority: | undecided → low |
status: | new → pending |
Changed July 25, 2011 10:23PM UTC by comment:2
status: | pending → new |
---|
here's the test case:
Changed July 25, 2011 11:01PM UTC by comment:3
priority: | low → high |
---|---|
status: | new → open |
Further reduction: http://jsfiddle.net/rwaldron/Z2Xnd/
Confirmed.
Changed July 25, 2011 11:01PM UTC by comment:4
milestone: | None → 1.next |
---|
Changed May 12, 2012 06:57AM UTC by comment:5
This works as intended: http://jsfiddle.net/Z2Xnd/1/ the
togglevalue will call show/hide at the beginning/end of its animation... It is still animating.
Changed July 25, 2012 12:44AM UTC by comment:6
resolution: | → invalid |
---|---|
status: | open → closed |
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/
Open the link and click to "Fork" (in the top menu) to get started.