tkahn/smoothTouchScroll — pull request #3 by humancopy (2014-03-26 22:57:38+00:00)
Title: Support scrollable text

Had issues when tried to make centre aligned text inside a div scrollable. Other option is to have a div inside a div but prefer not to have redundant elements on the page :)

What would happen is because the div didn't have any children the width will get calculated at 0 and the alignment would screw up... As in the (very simplified) example below I had a few elements which were same and they had to get smooth scroll if they were too long, otherwise should just stay centred.

If you test it you'll see that the short ```.text``` element will get aligned to the left because the width will be set to ```0px```. This commit fixes this.

For example:

```css
.text {
width: 150px;
white-space: nowrap;
text-align: center;
margin: 0 auto;
font-size: 16px;
font-family: Arial;
}
```
```html

I want to get scrolled properly even though I'm just simple text inside a simple div and the div doesn't have any children

I am short :)

```
```javascript
$(".text").smoothTouchScroll();
```

Thanks for a cool little plugin ;)