Fixed the plugin to call the correct javascript methods.