Created
April 29, 2014 10:34
-
-
Save ckng/11396439 to your computer and use it in GitHub Desktop.
IE8 last-child selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
// IE8 last-child selector | |
Drupal.behaviors.lastChildIE8 = { | |
attach: function (context, settings) { | |
if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) { | |
$('*:last-child').addClass('last-child'); | |
} | |
} | |
}; | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment