October 2018
Intermediate to advanced
192 pages
5h 12m
English
In this section, we will take a look at two scenarios for the actions class: double click and hover.
For the double click scenario, the following code creates an HTML page. This HTML page uses JQuery to show and hide the contents of a paragraph:
<!DOCTYPE html><html><head> <title>JQuery Demo</title> <script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script> <script type="text/javascript"> $(document).ready(function(){ $('h2').dblclick(function(){ $('p').show(); }) }); </script> <style> p { display:none; } </style></head><body> <h2>Double click Here!</h2> <p>This is some sample text</p></body></html>
Next, we ...
Read now
Unlock full access