We're using display: inline-block; to control elements that might live within the div of class "test". The javascript is now appearing on the page. I did not know "script" tags could ever render to the page. Has anyone found a way to work this example code to not hit elements such as "style" and "script"?
We're willing to use display:none; on our script and style tags but that's a kludge.
<html>
<head>
<style type="text/css">
.test * {
display: inline-block;
}
</style>
</head>
<body>
<div class="test">
<p>Text here</p>
<script type="text/javascript">
function TestFunction() {
var test = 1;
};
</script>
</div>
</body>
</html>
The output is:
Text here function TestFunction() { var test = 1; };
.test script { display: none; }, but it's better not to write selectors like.test *or putscripttags deep into document..test *is more of a kludge