I have a slide mechanic that's working, but I am having problems getting the div class of nfooter to hide when the slide mechanic triggers. The slide is triggered when the user clicks on the img src question.png.
I would like for the nfooter (which is another image) to disappear when the user selects the question.png image. When the user selects the question.png image for the second time, the slide mechanic hides and the nfooter shows.
Again, the slide mechanic is working fine, I just can't get the nfooter and the question.png to play nice.
<pre>
<script type="text/javascript">
// When the DOM is ready, initialize the scripts.
jQuery(function( $ ){
// Get a reference to the container.
var container = $( ".container" );
// Bind the link to toggle the slide.
$( "a" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
// Toggle the slide based on its current
// visibility.
if (container.is( ":visible" )){
// Hide - slide up.
container.slideUp( 300 );
} else {
// Show - slide down.
container.slideDown( 300 );
}
}
);
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<a href="#"><img src="../question.png" /></a>
<div class="nfooter"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src='swipe.js'></script>
<div class='container'>
<div class='inner'>
</div>
</div>
</pre>