added div to partial and fixed bug in event listener