Last active
February 11, 2018 23:08
-
-
Save lettergram/6fa2bdf384d965b8b4f143b1867b1818 to your computer and use it in GitHub Desktop.
Hide section(s) in detail wrappers based on window size or screen size
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
if ($(window).width() < 900) { | |
document.getElementById("meta_market_section").style = "display:inline;"; | |
var details = "<details>"; | |
details += "<summary>Market Data (click for details)</summary>"; | |
details += document.getElementById("meta_market_section").innerHTML; | |
details += "</details>"; | |
$("#meta_market_section").html(details); | |
document.getElementById("related_section").style = "display:inline;"; | |
details = "<br><details>"; | |
details += "<summary>Related Assets (click for details)</summary>"; | |
details += document.getElementById("related_section").innerHTML; | |
details += "</details>"; | |
$("#related_section").html(details); | |
} | |
document.getElementById("meta_market_container").style = "text-align:left;"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment