fix(guide): Fix language names in jQuery section of guide (#35271)
* Fix language names * Fix language name * Update index.md * Fix language names * Change javascript to js
This commit is contained in:
committed by
Randell Dawson
parent
421c097f17
commit
48312b3ff9
@ -6,7 +6,7 @@ title: Target HTML Elements with Selectors Using jQuery
|
||||
- You can "find" (or select) HTML elements based on their name, id, classes, types, attributes, values of attributes and much more.
|
||||
|
||||
## Example
|
||||
```javascipt
|
||||
```js
|
||||
//You can select all <p> elements on a page like this = $("p")
|
||||
$(document).ready(function(){
|
||||
$("button").click(function(){
|
||||
@ -17,7 +17,7 @@ title: Target HTML Elements with Selectors Using jQuery
|
||||
|
||||
|
||||
## Solution
|
||||
```javascript
|
||||
```html
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("button").addClass("animated bounce"); // We are selecting the button elements and adding "animated bounce" class to them.
|
||||
|
@ -5,7 +5,7 @@ title: Target the Parent of an Element Using jQuery
|
||||
|
||||
## Solution
|
||||
|
||||
```js
|
||||
```html
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#target1").parent().css("background-color", "red"); // Selects the parent of #target1 and changes its background-color to red
|
||||
|
@ -4,7 +4,7 @@ title: Target the Same Element with Multiple jQuery Selectors
|
||||
## Target the Same Element with Multiple jQuery Selectors
|
||||
|
||||
## Solution
|
||||
```javascript
|
||||
```html
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("button").addClass("animated"); // Target elements with type "button" and add the class "animated" to them.
|
||||
|
Reference in New Issue
Block a user