auxiliary / rpage

Highly responsive pagination for Bootstrap

Home Page:http://auxiliary.github.io/rpage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Function calculateWidth() fails in chrome

niklausburren opened this issue · comments

By li elements without inner span the function outerWidth() returns in chrome the value NaN. So the calculation of the width fails. I inserted if statement to check if the li-elements conatins a span element:

this.calculateWidth = function() { var width = 0; for (var i = 0; i < $container.find("li").length; i++) { if ($container.find("li").eq(i).children("a").length) { width += $container.find("li").eq(i).children("a").eq(0).outerWidth(); } else { width += $container.find("li").eq(i).children("span").eq(0).outerWidth(); } } return width; }

Fixed with pull request #23.