by @kodeazy
How to use JQuery in HTML using script tag?
-
Below is the
tag
used to work withJQuery
inHTML
.<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
-
Below is sample
HTML
code usingJQuery
to hide atag
inHTML
.<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("div").click(function(){ $('#oldId').hide(); }); }); </script> </head> <body> <div id="oldId" class="removableClass" style="display: block;cursor: pointer;">click here to remove class attribute.</div> </body> </html>