jQuery hide() doesn't work well

knightkomodo

New Member
Dear all,I've faced the following problem for a while. Please help me out!Here's my code:HTML\[code\]<html><head> <meta charset="utf-8" /> <!--css stylesheet--> <link href="http://stackoverflow.com/questions/15895167/style.css" rel="stylesheet" /> <!--jQuery external javascript - CDN--> <script src="http://stackoverflow.com//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> <link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" rel="stylesheet" /></head><body> <div class="header"></div> <div class="content"><input type="button" id="sendData" value="http://stackoverflow.com/questions/15895167/send your data" align="center"></div> <div class="barChart"><input type="button" id="reenterButton" value="http://stackoverflow.com/questions/15895167/Re-enter"> </div></body></html>\[/code\]CSS\[code\].content { text-align: center; background-color: white; width: 650px; height: 650px; display: inline-block; position: relative;}.barChart { text-align: center; background-color: white; width: 650px; height: 650px; display: inline-block; position: relative; display: none; // Make .barchart hide initially}\[/code\]Javascript\[code\]<script type="text/javascript">$(document).ready(function() { $("#sendData").button() .click(function() { $("div.content").hide("slide", {direction: "left"}, "slow", function() { $("div.barChart").show("slide", {direction: "right"}, "slow"); }); }); $("#reenterButton").button() .click(function() { $("div.barchart").hide("slide", {direction: "right"}, "slow", function() { $("div.content").show("slide", {direction: "right"}, "slow"); }); });});</script>\[/code\]The #sendData button works fine, but the click on #reenterButton doesn't work on the second statement(The one with the selector("div.barchart")). .barchart doesn't hide after applying the click action on reenter button. Is the situation related to the div status I set in css file? Or something else?Thanks for help!
 
Top