Replace Jquery -> jQuery (#35184)
* Replace Jquery -> jQuery * JQuery * Update index.md * Update index.md * Update index.md * Update index.md * Update index.md * Update index.md * Update index.md * Update guide/russian/jquery/jquery-html-method/index.md Co-Authored-By: lipis <lipiridis@gmail.com> * Update guide/russian/jquery/jquery-html-method/index.md Co-Authored-By: lipis <lipiridis@gmail.com>
This commit is contained in:
@ -14,7 +14,7 @@ jQuery adds a global variable with all of the libraries methods attached. The na
|
||||
|
||||
## Get Started
|
||||
|
||||
Before studying JQuery, you should have basic knowledge of these topics:
|
||||
Before studying jQuery, you should have basic knowledge of these topics:
|
||||
1. HTML
|
||||
2. CSS
|
||||
3. JavaScript
|
||||
|
@ -50,6 +50,6 @@ $(".myclass").slideDown("fast"); //will expand the element with the identifier m
|
||||
|
||||
|
||||
#### More Information:
|
||||
JQuery hide() method on the <a href='http://api.jquery.com/hide/' target='_blank' rel='nofollow'>Official website</a>
|
||||
jQuery hide() method on the <a href='http://api.jquery.com/hide/' target='_blank' rel='nofollow'>Official website</a>
|
||||
|
||||
|
||||
|
@ -40,5 +40,5 @@ $(".myclass").slideDown("fast"); //will expand the element with the identifier m
|
||||
|
||||
#### More Information:
|
||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
||||
JQuery Show() method on the <a href='http://api.jquery.com/show/' target='_blank' rel='nofollow'>Official website</a>
|
||||
jQuery Show() method on the <a href='http://api.jquery.com/show/' target='_blank' rel='nofollow'>Official website</a>
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
---
|
||||
title: HTML Method
|
||||
---
|
||||
|
||||
# HTML Method
|
||||
The Jquery `.html()` method gets the content of a HTML element or sets the content of an HTML element.
|
||||
|
||||
## Getting
|
||||
To return the content of a HTML element, use this syntax:
|
||||
```javascript
|
||||
$('selector').html();
|
||||
```
|
||||
|
||||
For example:
|
||||
```javascript
|
||||
$('#example').html();
|
||||
```
|
||||
|
||||
## Setting
|
||||
To set the content of a HTML element, use this syntax:
|
||||
```javascript
|
||||
$('selector').html(content);
|
||||
```
|
||||
|
||||
For example:
|
||||
```javascript
|
||||
$('p').html('Hello World!');
|
||||
```
|
||||
|
||||
That will set the content of all of the `<p>` elements to Hello World!
|
||||
|
||||
## Warning
|
||||
`.html()` method is used to set the element's content in **HTML** format. This may be dangerous if the content is provided by user. Consider using `.text()` method instead if you need to set non-HTML strings as content.
|
||||
|
||||
### More Information
|
||||
|
||||
[W3Schools](https://www.w3schools.com/jquery/html_html.asp)
|
||||
---
|
||||
title: HTML Method
|
||||
---
|
||||
|
||||
# HTML Method
|
||||
The jQuery `.html()` method gets the content of a HTML element or sets the content of an HTML element.
|
||||
|
||||
## Getting
|
||||
To return the content of a HTML element, use this syntax:
|
||||
```javascript
|
||||
$('selector').html();
|
||||
```
|
||||
|
||||
For example:
|
||||
```javascript
|
||||
$('#example').html();
|
||||
```
|
||||
|
||||
## Setting
|
||||
To set the content of a HTML element, use this syntax:
|
||||
```javascript
|
||||
$('selector').html(content);
|
||||
```
|
||||
|
||||
For example:
|
||||
```javascript
|
||||
$('p').html('Hello World!');
|
||||
```
|
||||
|
||||
That will set the content of all of the `<p>` elements to Hello World!
|
||||
|
||||
## Warning
|
||||
`.html()` method is used to set the element's content in **HTML** format. This may be dangerous if the content is provided by user. Consider using `.text()` method instead if you need to set non-HTML strings as content.
|
||||
|
||||
### More Information
|
||||
|
||||
[W3Schools](https://www.w3schools.com/jquery/html_html.asp)
|
||||
|
Reference in New Issue
Block a user