In spotfire - html page tab view -
i want implement html page tab view (attached sample image:page tab view.jpg) in spotfire text area. on click of menu in tab view, visualization has shown.
pasted html, css , js code below. if save html file desktop , open it, understand requirement.
i know styles can added part of html tags not sure whether level of css styles mentioned in html code shown below can included part of html tag in spotfire. not sure how pass control text area when clicked on menu option , show visualisation.
could please share video link or sample code or documentation how achieved in spotfire?
page tab view sample picture. want achieve in spotfire
<script> function opencity(evt, cityname) { var i, tabcontent, tablinks; tabcontent = document.getelementsbyclassname("tabcontent"); (i = 0; < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } tablinks = document.getelementsbyclassname("tablinks"); (i = 0; < tablinks.length; i++) { tablinks[i].classname = tablinks[i].classname.replace(" active", ""); } document.getelementbyid(cityname).style.display = "block"; evt.currenttarget.classname += " active"; } </script>
<style> body {font-family: "lato", sans-serif;} ul.tab { list-style-type: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid #ccc; background-color: #f1f1f1; } /* float list items side side */ ul.tab li {float: left;} /* style links inside list items */ ul.tab li { display: inline-block; color: black; text-align: center; padding: 14px 16px; text-decoration: none; transition: 0.3s; font-size: 17px; } /* change background color of links on hover */ ul.tab li a:hover { background-color: #ddd; } /* create active/current tablink class */ ul.tab li a:focus, .active { background-color: #ccc; } /* style tab content */ .tabcontent { display: none; padding: 6px 12px; border: 1px solid #ccc; border-top: none; } </style> <body>
<!doctype html> <html> <ul class="tab"> <li><a href="#" class="tablinks" onclick="opencity(event, 'london')">london</a></li> <li><a href="#" class="tablinks" onclick="opencity(event, 'paris')">paris</a></li> <li><a href="#" class="tablinks" onclick="opencity(event, 'tokyo')">tokyo</a></li> </ul> <div id="london" class="tabcontent"> <h3>london</h3> <p>london capital city of england.</p> </div> <div id="paris" class="tabcontent"> <h3>paris</h3> <p>paris capital of france.</p> </div> <div id="tokyo" class="tabcontent"> <h3>tokyo</h3> <p>tokyo capital of japan.</p> </div> </body> </html>
Comments
Post a Comment