According to your error, there’s a variable that your javascript is trying to reference called `Mother` that is undefined. It seems like your JS is running, but that there’s something amiss with your JS. If you share the JS snippet here we can help identify what that might be.
Additionally, if you’re attempting to implement a container (div) that has an on-click event, I’d suggest looking at the on-click event that exists on a container widget in Mendix. If you want to execute JS in this event, you can choose a nanoflow with a JS action.