[Solved] Navigate in DOM with Javascript

The easiest way would be to use: document.getElementsByTagName(“*”).length Is there something necessary like the numerical coding for node types like: 1: for element-nodes 3: for text-nodes 9: for document-nodes? No. You could write a function which recursively loops over the children of every node (starting at the document) and testing the node type of each … Read more

[Solved] Is it possible to have a checkbox contain a function?

With html: <input id=”my_checkbox” type=”checkbox” /> <div id=”my_total”>0.00</div> and jQuery script on domReady: $(document).ready(function(){ $(“#my_checkbox”).change(function(){ if($(this).is(‘:checked’)) { $(‘#my_total’).html(‘333.45’); } else { $(‘#my_total’).html(‘0.00’); }; }).trigger(‘change’); }); solved Is it possible to have a checkbox contain a function?

[Solved] Creating class in CSS is correct by this method?

This is basic HTML/CSS, and I cant really believe, that you did some research. Anyway, that’s how it works: CSS #first { Color: red; } HTML <div id=”first”> <p> some text </p> <p> some other text </p> </div> If you want to style classes you have to write .first, for ID’s #first EDIT: Where are … Read more

[Solved] Embed power point presentation on my page

you can use Google Doc viewer for that. It handles all kind of files : jpg, gif, png, doc, docx, xls, xlsx, ppt, pptx, etc… Download and include jQuery in your scripts: <script type=”text/javascript” src=”https://stackoverflow.com/questions/31513062/./js/jquery-1.11.3.min.js”></script> Create an empty container for your preview : <div id=’previewContainer’></div> You can display it on clicking on a button for … Read more