change some things (see description)

make plugin read data attribute instead of passing js for every
instance.