R
R
Ramil2014-08-23 16:01:05
HTML
Ramil, 2014-08-23 16:01:05

What will work faster? jquery.html() or jquery.text() ?

Interested in the answer to the question of what will be performed on the web page faster when inserting text.
jquery.text or jquery.html ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Petrov, 2014-08-23
@vafarulez

The question is: "Which is faster - innerText (textContent) or innerHTML?".
If you think about it a little, it is paraphrased as: "Which is faster - insert a single text node, or a bunch of nodes?".
I think the answer is already clear, but just in case .
If someone else has not understood - text () must be faster than html ().

V
Vitaly Kirenkov, 2014-08-23
@DeLaVega

These functions have different tasks... If it is pure text, then use .text(), if there are tags, then .html() accordingly

B
bumbay, 2014-08-23
@bumbay

Is it the text? Do you have a large volume?
Don't worry, they are two different functions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question