Click or tap to jump and click long or hold long to attack.
Thanks to @calderschutte for the coding and Thanks to my friend Benjamin who helped me with the idea.