ie error expected identifier string or number

ie error expected identifier string or number
ie error expected identifier string or number

IE 7 was throwing an error while working on some JavaScript

ie error expected identifier string or number

The problem was that I had an extra comma in a hash

this.css({
      "position":"fixed",
      "top": ( $K(window).height() - this.height() ) / 2 + "px",
      "left": ( $K(window).width() - this.width() ) / 2 + "px",
    });

It should have been

this.css({
      "position":"fixed",
      "top": ( $K(window).height() - this.height() ) / 2 + "px",
      "left": ( $K(window).width() - this.width() ) / 2 + "px"
    });

Photo: By stealingsand

Published by

MikeGrace

I am a Geek! I hope you enjoyed this recent post.