Fixed variable is already defined in JSLint

W004: 'elem' is already defined