Im programming a menu for mobile devices on my web site. When the user clicks arrow down image the sub menu appears and the image changes to arrow up.
However, when the user clicks on arrow up the image should be changed back to arrow down.
My script so far:
<!-- Hide show nav -->
<script>
$(document).ready(function(){
$(".show_hide_main_sub_menu").click(function () {
$("#main_sub_menu").toggle();
$(".show_hide_main_sub_menu").attr('src',"../_webdesign/images/main/arrow_up.png");
});
});
</script>
<!-- //Hide show nav -->
<a href="#"><img src="../_webdesign/images/main/arrow_down.png" alt="arrow_down.png" class="show_hide_main_sub_menu" /></a>
Can anyone point me in the right direction please?