Created
December 16, 2013 12:05
-
-
Save oranblackwell/7986020 to your computer and use it in GitHub Desktop.
Replicate default XML stylesheet with collapsable sections.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.likeXML{margin:20px 0} | |
.likeXML .text{color:#000;font-size:12px} | |
.likeXML .start-tag,.likeXML .end-tag{ | |
color:#800080 !important; | |
text-transform:uppercase; | |
cursor:pointer; | |
font-weight:bold; | |
font-size:12px | |
} | |
.likeXML li li{margin-left:20px} | |
.likeXML li li li{margin-left:20px} | |
</style> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery(".likeXML .collapseXML .start-tag").click(function() { | |
jQuery(this).parent().next("ul").toggle("slow"); | |
}); | |
}); | |
</script> | |
<div class="likeXML"> | |
<ul> | |
<li class="collapseXML"> | |
<div> | |
<<span class="start-tag">DATASET</span>> | |
</div> | |
<ul> | |
<li class="collapseXML"> | |
<div> | |
<<span class="start-tag">VEHICLE</span>> | |
</div> | |
<ul style="display: block;"> | |
<li> | |
<div> | |
<<span class="start-tag">MAKE</span>><span class= | |
"text">RENAULT</span></<span class="end-tag">MAKE</span>> | |
</div> | |
<div> | |
<<span class="start-tag">MODEL</span>><span class= | |
"text">FLUENCE</span></<span class="end-tag">MODEL</span>> | |
</div> | |
</li> | |
</ul> | |
<div> | |
<<span class="start-tag">/VEHICLE</span>> | |
</div> | |
</li> | |
</ul> | |
<div> | |
<<span class="start-tag">/DATASET</span>> | |
</div> | |
</li> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment