ftlabs / ftscroller

FTScroller is a cross-browser Javascript/CSS library to allow touch, mouse or scrollwheel scrolling within specified elements, with pagination, snapping and bouncing support.
MIT License
1.19k stars 121 forks source link

module.exports is empty when using browserify #74

Closed rdsubhas closed 9 years ago

rdsubhas commented 10 years ago

Hi, Thanks for the wonderful library! I'm using Browserify to package and running it in Chrome. But the FTScroller object is empty!

var FTScroller = require("ftscroller");
console.log(FTScroller); // empty object!

I believe this is because of the var module declaration in this line which could be messing up with the existing module object.

I've found your other excellent library ftlabs/FastClick to use a very nice way to define the module. I've tested with that and it works like a charm. Can we use that same approach here too?

Chrome v 33.0.1750.152, Browserify v 3.38.0, Node v 0.10.26, NPM v 1.4.3

apaleslimghost commented 9 years ago

Presumably fixed by your pull request :)