Skip to content

Instantly share code, notes, and snippets.

@ssylvia
Created October 28, 2015 15:04
Show Gist options
  • Save ssylvia/3133521833e8e6f119e8 to your computer and use it in GitHub Desktop.
Save ssylvia/3133521833e8e6f119e8 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// Get the full url to the app so we can load the readmore.js file
var path = location.pathname.replace(/\/[^/]+$/, '/');
// require Readmore.js and app events
require(["dojo/topic", path + "app/readmore.min.js"], function(topic) {
// After each point change, call readmore on the description pane
topic.subscribe("maptour-point-change-after", function(){
$('.description').readmore({
collapsedHeight: 10,
blockCSS: 'float: left; padding: 10px;'
});
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment