javascript - Is it possible to chain classes and ids in a similar way to CSS using jQuery -
is possible chain classes , ids in similar way css using jquery? example, if wish target different browsers apply next html tag:
<!--[if lt ie 7]> <html class="ie ie6 lte9 lte8 lte7"> <![endif]--> <!--[if ie 7]> <html class="ie ie7 lte9 lte8 lte7"> <![endif]--> <!--[if ie 8]> <html class="ie ie8 lte9 lte8"> <![endif]--> <!--[if ie 9]> <html class="ie ie9 lte9"> <![endif]--> <!--[if gt ie 9]> <html> <![endif]--> <!--[if !ie]><!--> <html class="notie"> <!--<![endif]-->
this allow me target element in ie7 using:
.ie7 #div{ float: left }
i wish follow pattern of graceful degredation on website , know jquery plugin wish utilize not work in ie7 or ie8 ( throws style out of position example) hence wish prevent jquery plugin triggering in ie7 , ie8. how this?
your selectors should working, worth testing them simple like
$(".lte9 #head").css('color','red');
if doesn't work selector wrong.
javascript jquery
No comments:
Post a Comment