0

I have this snippet:

<script type="text/javascript">
AJS.$(document).ready(function() {
    AJS.$('#show-more-links-link').click();
})
</script>

It clicks a link. It works OK when the page with the link is loaded/reloaded, but when it is revisited, it doesn't. (AJS.$ is method for using Jquery in Jira).

Any ideas?

Devin
  • 7,690
  • 6
  • 39
  • 54
  • When you go back to the page, does the page actually reload? Or does it just restore from the browser's cache (and therefore not call document ready)? – mason Sep 02 '14 at 23:08

1 Answers1

0

You don't appear to have a handler for your click:

Try:

 AJS.$('#show-more-links-link').click(function() {

 alert("Whatever you wanted to do here");

 });
Corbin
  • 414
  • 5
  • 19