opening event for snap.js