When click anchor tag don't hide DIV
Hi,
I want to hide a div when I click on navigation li>a
HTML:
for Home/Request A quote anchor tag:
<ul class="nav navbar-nav">
<li class="active"><a href="#" class="home">Home</a></li>
<li><a href="#" class="requestaquote">Request A Quote</a></li>
...
The div I want to hide:
<div class="alert alert-success">Featured Product
<p class="featured-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<button type="button" class="btn btn-default btn-feature">BUY NOW</button>
</div>
Jquery:
$(document).ready(function() {
//attach click event to buttons
$(".home").click(function(){
/**
* when show button is clicked we call the show plugin
* which scales the box to default size
* You can try other effects from here: http://jqueryui.com/effect/
*/
$(".alert").show("scale", 500);
});
$(".requestaquote").click(function(){
//same thing happens except in this case we hide the element
$(".alert").hide();
});
});