Update plugin.js

Some modifications, still some problems of offset on position above.