change styling onclick/hover
Hi Ray
How would I go about changing this elements css onclick/hover?
<div class="container subWrapper">
</div>
So before onclick/hover the css is
.container.subWrapper {
position: absolute;
display: none;
}
after I would like it to be
.container.subWrapper {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: start;
margin-left: -200px;
width: 600px;
background-color: #fff;
box-shadow: rgba(0, 0, 0, .5) 0 7px 10px 1px;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
-moz-box-pack: start;
justify-content: flex-start;
}
am assuming that it will probably js to achieve this?
I have this that triggers the drop down (as this is a menu)
<script type="text/javascript">
$(".navigation").mouseover(function(){
$(this).children('div').slideDown("fast");
});
$(".navigation").mouseleave(function(){
$(this).children('div').slideUp("fast");
});
$(".subWrapper").click(function( event ) {
event.stopPropagation();
});
</script>
Cheers
Jamie