javascript - Calling Function From Button Click -
so, @ bottom of page load js file:
<script src="js/galleryexpand.js"></script>
within there bit of code goes:
// return on esc $(document).keyup(function(e) { if (e.keycode === 27) { // esc key if (overlayactive) { returntooriginal(); } } });
i have button in page call function from:
<a class="waves-effect waves-light btn btn-large white amber-text btn-flat">i've read it</a>
however, when try , insert onclick function:
<a onclick="returntooriginal();" class="waves-effect waves-light btn btn-large white amber-text btn-flat">i've read it</a>
it says function not recognised.
can tell me i'm doing wrong please?
thanks.
=== edit === modal trying close same 1 (https://themes.materializecss.com/pages/demo#sacred) trying simulate "back" button in own button - cannot seem to. appreciated.
Comments
Post a Comment