CSS:
<div class="box">
<p>This is a box</p>
</div>
Javascript:
var box = {
content : (function() {return ("This is the content of the box")})
};
alert("Box content: \n" + box.content());
$("output").text( +"<br/>\n");
Just wondering, why am I unable to access box.content()
from an anchor tag but it works fine within the script section?
It seems like the object is not recognized when called from the anchor. Is this intentional behaviour across different browsers?