Changed selector scope from 'body' to the element itself to avoid conflicts with other handlers