I need to set all the div elements inside the div with id "editor" to display as block. However, when I change the display property of the div with id "editor", only that specific div's display is affected, while everything else inside the div becomes display none.
Below is the code snippet:
doctype html
html
head
title #{title} - My Site
link(rel='stylesheet', href='stylesheets/style.css')
script(src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.min.js")
script.
function name(id, id2){
document.getElementById(id).style.display = 'block';
document.getElementById(id2).style.display = 'none';
//document.getElementById(id3).style.display = 'none';
}
body(onload ='name("rename", "ineditortxt")')
div(id="rename", class="Name")
h1= "Enter File Name"
form(id = "filename", method ="post")
input(id="new_name", type ="text", placeholder="File Name")
input(id="Okay", type="submit", value="Okay")
div(id="ineditortxt")
h1= "Welcome to Editor"
div(id="editor")
|Welcome to the home pages
|This is the first Paragraph
script(src="javascripts/ace.js", type="text/javascript")
script.
var editor=ace.edit("editor");
script(src="/jvm.js", type="text/javascript")
script.
document.getElementById('filename').addEventListener('submit',function(e){
e.preventDefault();
document.getElementById("ineditortxt").style.display = 'block';
document.getElementById("editor").style.display='block';
document.getElementById("rename").style.display = 'none';
});