Skip to main content

Bug Tracker

Side navigation

#1219 closed bug (fixed)

Opened May 21, 2007 05:37PM UTC

Closed June 21, 2007 02:38AM UTC

Last modified June 21, 2007 02:53AM UTC

toggle() without parameters runs animation

Reported by: nlogax Owned by:
Priority: major Milestone: 1.1.3
Component: effects Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:
Description

I noticed in the 1.1.3 alpha that my toggle():s were running animations all of a sudden, when they should just toggle display betwen block and none.

Attachments (0)
Change History (5)

Changed June 04, 2007 11:45AM UTC by hobbit comment:1

The toggle method doesn't work if it restarted under animation. A simplified sample page:

<html>
<head>
  <title>Test page</title>
  <style type="text/css">
    #first {
      border: 2px solid #ccc;
      background-color: #eee;
      padding: 2px;
      height: 150px;
      width: 350px;
    }
    #second {
      cursor: pointer;
    }
  </style>
  <script type="text/javascript" src="jq.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){

    $("#second").click(function(){
      $("#first").toggle(2000);
    });

  });
  </script>
</head>
<body>

  <div id="second">click here and click again under animation</div>
  <div id="first"></div>

</body></html>

Changed June 04, 2007 11:47AM UTC by hobbit comment:2

Replying to [comment:1 hobbit]:

The show and hide animations don't work if we add the speed parameter to the methods, and the display style is set to none.

<html>
<head>
  <title>Test page</title>
  <script type="text/javascript" src="jq.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){

    $("#first").hide(1);
    $("#second").click(function(){
      $("#first").show(1);
    });

  });
  </script>
</head>
<body>

  <div id="second">Click here</div>
  <div id="first" style="display:none">First item</div>

</body></html>

Changed June 04, 2007 11:49AM UTC by hobbit comment:3

The component is core.

Changed June 21, 2007 02:38AM UTC by john comment:4

resolution: → fixed
status: newclosed

Fixed in SVN rev [2129].

Changed June 21, 2007 02:53AM UTC by john comment:5

priority: minormajor

Oops, I meant rev [2130].