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
[…] to Carolos Roque for this solutions – stored here for posterity’s sake with some small updates and […]
Leave a Reply