[wp-trac] [WordPress Trac] #16024: Conditional Comments for JS

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 17 14:32:52 UTC 2012


#16024: Conditional Comments for JS
---------------------------------+-----------------------------
 Reporter:  filosofo             |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Template             |     Version:  3.1
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.3-early  |
---------------------------------+-----------------------------

Comment (by mattwiebe):

 This should also detect for the use-case of !IE (and other conditions
 which will show if 1) the condition is true or 2) the browser doesn't pay
 attention to CCs), which requires a slightly different syntax:

 {{{
 <!--[if !IE]><!-->
 <p>You are not using Internet Explorer.</p>
 <!--<![endif]-->
 }}}

 This will become especially important once we hit jQuery 2.0, which will
 not support IE <= 8, using 1.9 as a fallback for oldIE. The recommended
 usage at that point will be:

 {{{
 <!--[if lt IE 9]>
     <script src="jquery-1.9.0.js"></script>
 <![endif]-->
 <!--[if gte IE 9]><!-->
     <script src="jquery-2.0.0.js"><</script>
 <!--<![endif]-->
 }}}

 `^` From http://blog.jquery.com/2012/06/28/jquery-core-version-1-9-and-
 beyond/

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16024#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list