dauruk0512 Posted December 8, 2015 Share Posted December 8, 2015 (edited) Hi Again, thanks for anyone read or help me figure this issue, i got this tutorial from here , please click and check how can i make when users click crop only the result crop images in the box prevent user only 1 click i knew why users can click crop multiple time and results multiple images too cause this script line 62 from index.html $('#btnCrop').on('click', function(){ var img = cropper.getDataURL() $('.cropped').append('<img src="'+img+'">'); }) Any one please guide me Edited December 8, 2015 by dauruk0512 Link to comment Share on other sites More sharing options...
justsomeguy Posted December 8, 2015 Share Posted December 8, 2015 With jQuery you can use the off method to remove an event handler that you added with the on method. You'll need to make the event handler a regular function instead of an anonymous function though. You can also just use a variable to keep track of whether they already ran that function and only run it once. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now