Skip to content

Instantly share code, notes, and snippets.

@ashblue
Last active March 26, 2021 16:59
Show Gist options
  • Save ashblue/e1f881cafbeb17b4272d to your computer and use it in GitHub Desktop.
Save ashblue/e1f881cafbeb17b4272d to your computer and use it in GitHub Desktop.
From http://localhost/visa-signature/apply.jsp
DRAWER_CONTAINER = 'offer-drawer'
# Remove the drawer if the CSS class changes
_isMobileClass = false
$(window).resize(->
mobileOn = $HTML.hasClass('mobile')
# Change detected, clear the existing class
if mobileOn != _isMobileClass
_isMobileClass = mobileOn
$('#' + DRAWER_CONTAINER).detach()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment