jQuery .show() not working properly in Chrome

So I finally got around learning jQuery, better late than never, so on my first script I ran into this weird problem.
I made this simple click once hide an element show another scrip for a simple accordion, it worked great in IE and FF but then when i tested in Chrome, it didn’t work!
I could display the element but it would not hide. and even thought it did show, the slow effect did not work. The weird thing is that it worked for the second element.
After looking in the internets I didn’t find anything useful, they talked about updating to the latest jQuery but i already had the latest version.
Finally I had a stroke of genius! the element I was trying to hide was a span tag, so I figure changing it to a div couldn’t hurt and what do you know? the darn thing worked like a charm effects and everything!
Damn you Chrome!
here is what my code look like, there might be an easier way to do this but for what I need it works just fine
$(document).ready(function(){
$("#showup").click(function(){
$("#signin_body").hide("fast");
$("#signup_body").show("slow");
});
$("#showin").click(function(){
$("#signup_body").hide("fast");
$("#signin_body").show("slow");
});
});

and here is the HTML

New Users Click <button id="showup">Here</button>
<div id="signup_body" style="display: none;">Some Content here</div>
Existing Users Click <button id="showin">Here</button>
<div id="signin_body" style="display: none;">Some more content here</div>

  1. A coworker stored production assets in Dropbox. Chaos ensued.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.