I have this code:
(options.parent) ? top = options.parent.height / 2; : top = parent.height() / 2;
Because of the double slash that i use there it get's an error i know why i get the error i just don't know how to write it to work.
Thanks again.
It has nothing to do with the "double slashes", remove the semicolon
(options.parent) ? top = options.parent.height / 2
:top = parent.height() / 2;
Semicolon was meant to define end of statement(optional), the ternary operator is treated as a single statement.
(options.parent) ? top = options.parent.height / 2; : top = parent.height() / 2;
// ^------ Wrong!