Posts

Showing posts with the label JavaScript

Generating 3D Structure Offline using JSME and BALLOON

Image
JME/JSME is a free and open-source molecule editor developed by Peter Ertl and Bruno Bienfait. JSME (JavaScript Molecule Editor) is the successor of JME (Java Molecule Editor). JME is a Java applet application converted to JavaScript due to security and portability issues in Java. JSME is a popular lightweight molecule editor application developed so far. Jmol/JSmol is a free and open-source molecule visualization tool developed by Bob Hanson . JSmol (JavaScript Molecule Viewer) is the successor of Jmol (Java Molecule Viewer). Jmol is a JAR (Java ARchive) application converted to JavaScript due to security and portability issues in Java. Jmol is the most popular molecule visualization tool implemented in many bioinformatics or cheminformatics web applications. JSmol in collaboration with JSME, has implemented a 2D ( SMILES string) to 3D structure conversion method by integrating the API of the CACTUS server. The link to an interactive demo of JSME and JSmol is here . B...

Simple Show/Hide Text using JavaScript

Image
This is a simple tutorial which explains how to show or hide lines in a paragraph using JavaScript. The concept is to split the lines in the paragraph into two sections and show/hide the second section by clicking a hyperlinked text (to create a toggle effect). By default, the first section in the paragraph is set to always visible, and a hyperlink at the end of the line with onclick action to display the second section . Similarly, a hyperlink at the end of the line of the second section with onclick action is displayed after a mouse click event to hide the second section . Example This is a simple tutorial which explains how to show or hide lines in a paragraph using JavaScript. <a style = 'text-decoration: none' id = 'show_line' href = 'javascript:void(0)' onclick = "document.getElementById('more').style.display = 'inline'; document.getElementById('hide_line').style.display = 'inline'; document.getElemen...