Catfishes and speed fixes

Here’s a handy Catfish plugin for Jquery. The author’s site seems to have disappeared, so I can’t comment there, but the one big thing to fix in this is to include a “speed fix”, which smoothes the jerkiness in the IE6 expression-based workaround.

Sitepoint’s original Catfish implementation was great, but big and slow pages tend to react badly with their IE6 workaround. Another approach is to use expressions to emulate position: fixed.

<!--[if lt IE 7]>
<style type="text/css">

body { background: url(hack) fixed; } /* 'speed fix', fixes the jerkiness of IE6 */
#catfish {
    position: absolute;
    top: expression(
        offset = parseInt(catfish.offsetHeight),
        document.documentElement.scrollTop + document.documentElement.clientHeight - offset + 'px'
    );
}

</style>
<![endif]-->

Ilya
  • Home
  • About
  • Preferences


RSS

February 2008

Mon

Tue

Wed

Thu

Fri

Sat

Sun

 

 

 

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

Jan   Mar

Beared souls

caught together