What does jQuery do differently when you specify the datatype as html as opposed to text. I haven't seen a difference but there must be some subtleties I'm missing. If I wish to return a portion of an html page as a string does it matter which I use?
"html": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM. "text": A plain text string.
So really the only difference is if you have script tags.
source: http://api.jquery.com/jQuery.ajax/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With