tags:

views:

50

answers:

2

This one boggles my mind. I've used this same script (different targets of course) on other elements in my script and it works perfectly. Why, in this instance does the slideToggle only slide down?

Here is the hide, slideToggle code:

 $('div.addLocation').hide();
 $("p.buslocadd").click(function() {
  $(this).prev('div.addLocation').slideToggle(400);
  return false;
 });

Here are the target elements:

<div class="addLocation">
</div>
<p class="buslocadd"></p>

What's the deal?

A: 

Works for me.

Can you show some more code, or reproduce the error at jsbin.com?

nickf
Belongs in a comment IMO.
strager
why ?
redsquare
A: 

Works fine for me in this pastebin.me demo.

redsquare