diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-19 16:06:36 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-19 16:06:36 -0700 |
commit | bfcbb600394c33b9cc176d8e0ec4293e1e22620a (patch) | |
tree | 8201313fd23bc3a905689cf860643724915fb50d | |
parent | bb24ce26b4774b60b28c6eef19275d1a8189d1a9 (diff) |
Modified the conversion of the margin-top and margin-bottom css values. The
problem arises because $(selector).css("margin-top) does not return a string
and therefore the replace function is undefined.
-rw-r--r-- | lib/gallery.common.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js index e00eb62a..06775d79 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -89,8 +89,8 @@ */ $.fn.gallery_height = function() { var ht = $(this).height(); - var mt = $(this).css("margin-top").replace("px",""); - var mb = $(this).css("margin-bottom").replace("px",""); + var mt = parseInt($(this).css("margin-top")); + var mb = parseInt($(this).css("margin-bottom")); return ht + parseInt(mt) + parseInt(mb); }; |