I have a drop down menu (its from some template). Now I would like to drop it down by the code. It will be a linkable text, and when user will click on it, the drop down menu will open.
This is the code I have in:
1. IN Header.php:
<?php if(get_option('droppanel')!="disable") { ?>
<div class="trigger">
<?php if(isset($_POST['TopFirstsubmitted']) || isset($_POST['TopSecondsubmitted']) || isset($_POST['TopThirdsubmitted']) || isset($_POST['TopFourthsubmitted'])) { ?>
<a id="open" style="display: none;" class="toggle open" href="#"><img src="<?php bloginfo('template_url'); ?>/images/blank.gif" width="15" height="10" alt="open panel" /></a>
<a id="close" class="toggle close" href="#"><img src="<?php bloginfo('template_url'); ?>/images/blank.gif" width="15" height="10" alt="close panel" /></a>
<?php } else { ?>
<a id="open" class="toggle open" href="#"><img src="<?php bloginfo('template_url'); ?>/images/blank.gif" width="15" height="10" alt="open panel" /></a>
<a id="close" style="display: none;" class="toggle close" href="#"><img src="<?php bloginfo('template_url'); ?>/images/blank.gif" width="15" height="10" alt="close panel" /></a>
<?php } ?>
</div><!-- /trigger -->
2. AND THIS IS THE CODE FROM JavaScript:
// Expand Panel
$("#open").click(function(){
$("div#panel").animate({height: "show"}, 900, "easeInOutCubic");
});
$(".contacttrigger").click(function(){
$("div#panel").animate({height: "show"}, 900, "easeInOutCubic");
$("#toggle a.toggle").toggle();
});
$(".droppaneltrigger").click(function(){
$("div#panel").animate({height: "show"}, 900, "easeInOutCubic");
$("#toggle a.toggle").toggle();
});
Can anyone help me out, how to create a piece of code that will drop down this dropDown menu from code (on some text click).