summaryrefslogtreecommitdiff
path: root/plugins/legacy_browser/js/iehacks.js
blob: 129ad6003e4e31beb5d631b5c07c62024adc54dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

// Make getElementById() case-sensitive on IE7
document._getElementById = document.getElementById;
document.getElementById = function(id) {
  var i = 0, obj = document._getElementById(id);

  if (obj && obj.id != id)
    while ((obj = document.all[i]) && obj.id != id)
      i++;

  return obj;
}

// fix missing :last-child selectors
$(document).ready(function() {
  if (rcmail && rcmail.env.skin != 'classic')
    $('ul.treelist ul').each(function(i, ul) {
      $('li:last-child', ul).css('border-bottom', 0);
  });
});