jQuery not selecting div class

Posted by Cortopasta on Stack Overflow See other posts from Stack Overflow or by Cortopasta
Published on 2010-05-27T20:47:51Z Indexed on 2010/05/27 20:51 UTC
Read the original article Hit count: 209

Filed under:
|
|
|

Trying to make a simple toggle menu, and I can't seem to hide/show the sub menu using this bit of jQuery:

$(".topic news").mouseup(function(){
    $(".feed groups").hide("fast", function(){
      $(".feed messages").hide("fast");
      $("ul.feed news").toggle("fast");
    });
  });

Here is the corresponding HTML:

<div class="topic news">
  <span>News Feed</span>
 </div>
 <ul class="feed news">
  <li>News item #1</li>
  <li>News item #1</li>
  <li>News item #1</li>
  <li>News item #1</li>
  <li>News item #1</li>
 </ul>

Any ideas?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery