Last active
February 11, 2018 23:08
-
-
Save lettergram/0b515c0ba051745dda76a0a0a86e8283 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 hidden or 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
| # On mobile, Hide elements in details wrappers | |
| if $(window).width() < 900 | |
| document.getElementById("meta_market_section").style = "display:inline;" | |
| 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