Skip to main content
added the question into the title, improved formatting and removed unnecessary thanks
Source Link

How to get the value of anthe lang attribute with jQuery?

supposeSuppose I have an htmlHTML document that looks like this:

<html lang="en"> ... </html> 

myMy question is  : how to get the value of the attribute langlang with jQuery? 
I've tried $("html").attr("lang")$("html").attr("lang") but it did not work  ... any any suggestions  ?

thanks a lot !

How to get the value of an attribute with jQuery

suppose I have an html document that looks like :

<html lang="en"> ... </html> 

my question is  : how to get the value of the attribute lang with jQuery? I've tried $("html").attr("lang") but it did not work  ... any suggestions  ?

thanks a lot !

How to get the value of the lang attribute with jQuery?

Suppose I have an HTML document that looks like this:

<html lang="en"> ... </html> 

My question is: how to get the value of the attribute lang with jQuery? 
I've tried $("html").attr("lang") but it did not work... any suggestions?

edited title
Link
molf
  • 75.5k
  • 13
  • 139
  • 118

[jQuery] : How to get the value of an attribute with jQuery

added 12 characters in body
Source Link
Quentin
  • 948.6k
  • 136
  • 1.3k
  • 1.4k

suppose I have an html document that looks like :

...
<html lang="en"> ... </html> 

my question is : how to get the value of the attribute lang with jQuery? I've tried $("html").attr("lang") but it did not work ... any suggestions ?

thanks a lot !

suppose I have an html document that looks like :

...

my question is : how to get the value of the attribute lang with jQuery? I've tried $("html").attr("lang") but it did not work ... any suggestions ?

thanks a lot !

suppose I have an html document that looks like :

<html lang="en"> ... </html> 

my question is : how to get the value of the attribute lang with jQuery? I've tried $("html").attr("lang") but it did not work ... any suggestions ?

thanks a lot !

Source Link
PapelPincel
  • 4.4k
  • 9
  • 42
  • 52
Loading