Currently working on creating a new property named startPosition
and setting the top
property to equal the button's current top
value in CSS.
Below is the jQuery code snippet:
var morphObject = {
button: $('button.morphButton'),
container: $('div.morphContainer'),
overlay: $('div.overlay'),
content: $('h1.content, p.content'),
startPosition: {
top: morphObject.button.css('top')
// top: 150,
// left: '20%',
// width: 200,
// height: 70,
// marginLeft: -100
},
This is the point at which the error occurs. The issue is:
[Error] TypeError: undefined is not an object (evaluating 'morphObject.button')
Any advice on how to properly execute this task? Thanks.