-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexjq.html
99 lines (90 loc) · 3.37 KB
/
exjq.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="./icon.png">
<meta charset = "utf-8">
<title>JQCode.net JQuery</title>
<script src="./jquery-3.6.0.min.js"></script>
<link id="def" rel="stylesheet" href="default.css">
<link id="stl" rel="stylesheet" href="styles.css">
<script src="./script.js"></script>
</head>
<body>
<nav>
<div class="navbar">
<image class="navimg name" src="./icon.png" alt="JQCode Logo">
<a class="navlink" href="./index.html">Home</a>
<a class="navlink" href="./quiz.html">Topic Quizzes</a>
<a class="navlink" href="./about.html">About</a>
<a class="dropdown">
<a class="navlink dropbtn">Examples and Tutorials</a>
<div class="dropdown-content">
<a href="./exhtml.html">HTML</a>
<a href="./exjs.html">JavaScript</a>
<a href="./excss.html">CSS</a>
<a href="./exjq.html">Jquery</a>
<a href="./expy.html">Python</a>
</div>
</a>
</a>
</div>
</nav>
<header></header>
<aside>
<div>
<p></p>
<a id="idd">🌓 Theme</a>
</div>
</aside>
<section>
<h1>JQCode.net</h1>
<h3>Introduction JQuery:</h3>
<p>Jquery is a JavaScript library for easily scripting webpages.</p>
<div>
<p>JQuery can be used to quickly do many different things, linke hide elements:</p>
<div class="codep">
<p>$(<span class="val">"p"</span>).hide();</p>
</div>
</div>
<p></p>
</section>
<section>
<p></p>
<div>
<p>If at any time you would like to try the code on this site you can use <a href="https://www.onlinegdb.com/" target="blank">GDB Debugger</a> or <a href="https://www.w3schools.com/html/tryit.asp?filename=tryhtml_default" target="blank">W3Schools Tryit Editor</a> or use a text editor. To do that make a new file called 'index.html' and open with your text editor (don't double click, it will open the HTML file in your browser)</p>
</div>
</section>
<section>
<p></p>
<div>
<h3>JQuery Syntax Basics</h3>
<p>Jqury is a fun language to learn but you need to remember a few important things:</p>
<p>If you don't know JavaScript i'd advise learning that first.<br>
Jquery uses:<br>
<div class="codep">
<p>$(<i class="val">"selector"</i>).<i>action</i>();</p>
</div>to manipulate elements, notice the $.</p>
<p>lets make a script:</p>
<div class="codep">
<p>$(<span class="val">"p"</span>).hide();</p>
</div>
<p>This script will hide all the paragraphs, notice the "p".</p>
<p>Now lets put it to action by making it wait for the paragraph to be clicked.<br>
(the first part is to make it only work when the page is loaded)</p>
<div class="codep">
<p>$(document).ready(<span class="tag">function</span>(){<br>
$(<span class="val">"p"</span>).click(<span class="tag">function</span>(){<br>
$(<span class="tag">this</span>).hide();<br>
});<br>
});</p>
</div>
<p>Don't forget to download Jquery <a href="https://jquery.com/download/">Here</a>, or link to: 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js'</p>
<p>To see it in action use <a href="https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide" target="blank">one</a> of the editors above, or go <a href="./jqex1.html" target="blank">Here</a></p>
</div>
</section>
<footer>
<p>Copyright 2022 Samuel Sargent, Owner and Developer</p>
</footer>
</body>
</html>