What is your version of Chrome?
I am using Chrome 51 and never had this problem.
Is it possible that toggle_div is defined within a different functional context (say, within an immediately-invoked function expression - (function () { }());)?
Did you verify that the context of the console is correct? There is a selection box above the console, it usually says "top" (which is the context of the top frame) but recently, a feature was implemented so that when you focus on an element (in the Elements panel) that forms (or that is from) a different context (say, an <iframe>, or an element within an <iframe>) it automatically changes to that context.
I just realized that focusing on an <iframe> is enough to change contexts, which seems excessive and counterintuitive - the <iframe> itself is in the context of the document that contains it, so why does it change to the context of the <iframe>?