Javascript to detect if a div is contained inside another and when is not anymore
- by user3668732
i have a question.
I need to detect using javacript (or JQuery) when a div is contained inside another and when is not contained anymore.
I need something like this:
if(div #result).contains (div #dbResults) then{#explainMsg.hide, #errorMsg.hide;
if(div #result).not contains (div #dbResults) anymore then {#errorMsg.show}.
the "not contains anymore" part is because the div's are added dynamically server side.
Obliviously is not the code, but what i need to obtain.
thanks