Last active
August 29, 2015 14:10
-
-
Save dangerouse/10f191bad249937b022f to your computer and use it in GitHub Desktop.
CloudSponge Widget - Launch from a div instead of an anchor
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
(function(u){ | |
var d=document,s='script',a=d.createElement(s),m=d.getElementsByTagName(s)[0]; | |
a.async=1;a.src=u;m.parentNode.insertBefore(a,m); | |
})('//api.cloudsponge.com/widget/YOUR_WIDGET_SCRIPT.js'); | |
</script> | |
</head> | |
<body> | |
<div id="csLaunch">Add from Address Book</div> | |
<textarea id="contact_list"></textarea> | |
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script type='text/javascript'> | |
window.csPageOptions = { | |
textarea_id:'contact_list' | |
}; | |
$(function(){ | |
$('#csLaunch').click(function(){ | |
cloudsponge.launch(); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment