Javascript Class Inheritance
<p>Can anyone tell me why my 'showDiv_boo' is undefined inside the class´s method?
I also can´t access my class´s methods.</p>

<p>Here´s my class 'Blink' class with its properties and methods:</p>

<pre><code>function Blink(div) {
    this.div = div
}
Blink.prototype.counter = 0
Blink.prototype.showDiv_boo = true
Blink.prototype.showDiv = function() {
    this.div.style.visibility = 'visible'
}
Blink.prototype.hideDiv = function() {
    this.div.style.visibility = 'hidden'
}
Blink.prototype.startEngine = function() {
    if (this.showDiv_boo) {
        this.showDiv()
    } else if (!this.showDiv_boo) {
        this.hideDiv()
    }
    this.showDiv_boo = !this.showDiv_boo
    this.counter++
}
Blink.prototype.startEffect = function() {
    this.idEffect = setInterval(this.startEngine, 1000 / 45)
}
</code></pre>

<p>So, if I create:</p>

<pre><code>_blink = new Blink(myDiv);
_blink.startEffect();
</code></pre>

<p>You can test... the variable 'showDiv_boo', is undefined inside the method.</p>

<p>Even, if I set the showDiv_boo inside the method to true, it won´t call my class´s methods showDiv or hideDiv.</p>

<p>Anyone?</p>

<p>Thanks :)</p>
