Search This Blog

Google Analytics

Friday, October 01, 2010

jQuery getBoundingClientRect syntax error

You may experience a javascript error complaining on the line
var d=b.getBoundingClientRect(),

A solution to the above error is to replace it with the following
try{var d=b.getBoundingClientRect();}catch(ex){var d={top:0,left:0,right:0,bottom:0};}

No comments:

Post a Comment

Do provide your constructive comment. I appreciate that.

Popular Posts