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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -