Change some attribute access with 'this'
Use the 'each' jQuery function instead of forEach