jquery - Change HTML tag dir value to none if dir ="rtl" -


<html dir="rtl" lang="ar"></html> $( "html[dir=='rtl']" ).attr("dir", ""); 

i want change dir value none. if dir="rtl" jquery. have tried above code, not working. solutions.

$( "html[dir='rtl']" ).attr("dir", ""); 

try this. use = instead of == checking equality.

or

var dir = $("html").attr("dir"); if(dir == "rtl") {    $("html").attr("dir", ""); } 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -