Skip to content

Instantly share code, notes, and snippets.

@mikebuchanon
Last active December 31, 2015 23:09
Show Gist options
  • Save mikebuchanon/8057999 to your computer and use it in GitHub Desktop.
Save mikebuchanon/8057999 to your computer and use it in GitHub Desktop.
Example modal announcement using jQuery and smartModal
<link href="//content.learntoday.info/javascript/smartModal/jquery.smartModal.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//content.learntoday.info/javascript/smartModal/jquery.smartModal.min.js"></script>
<script src="//content.learntoday.info/javascript/smartModal/jquery.cookie.js"></script>
<script>
$(function() {
$.smartModal({ overlayDelay: 300, hideDelay: 200, cookieExpires: 365 });
});
</script>
<div class="smartmodal auto once">Exciting Modal window that only shows once.<br>We've updated some stuff! It's really neat!
<p>Please checkout the following new things:</p>
<ul>
<li>thing 1</li>
<li>thing 2</li>
<li>thing 3</li>
</ul>
<span style="float:right;"><input type="button" class="close" value="Ok" /></span>
</div>
<div>Boring default message for display in the announcements list goes here</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment