How do you do this from a link on the page (i.e. not the moving button seen here)? http://bit.ly/6BQ5eq

1 answer

4
points

The easiest way is to trigger the click event of the original toggle, i.e. $(".btn-slide").click();

This snippet should do it for you:

<a class="another-toggle">Click this too!</a>
<script type="text/javascript">
    jQuery(function($) {
        $(".another-toggle").click(function(){$(".btn-slide").click();});
    });
</script>
Answered almost 7 years ago by Justin Hileman
  • Thanks, I'll give that a go! Liam Brazier almost 7 years ago