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
Post a Comment