Skip to content

Instantly share code, notes, and snippets.

@bytehead
Last active December 18, 2015 07:48
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save bytehead/5748928 to your computer and use it in GitHub Desktop.
Save bytehead/5748928 to your computer and use it in GitHub Desktop.
last-child selector in ie8
// there is a solution for jQuery < 1.9.0, where you can use `$.browser`:
// https://gist.github.com/nathansmith/950767
// but jQuery removed `$.browser` in version 1.9.0, so you have to get another way:
function last_child() {
if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {
$('*:last-child').addClass('last-child');
}
}
@aemonge
Copy link

aemonge commented Oct 2, 2013

That's almost what I'm looking for. It's missing a callback whenever the DOM is modified. If you can do this, I'll Rock!

@kutec
Copy link

kutec commented Nov 15, 2013

How to configure this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment