Skip to content

Instantly share code, notes, and snippets.

@renatosnrg
Created August 16, 2012 13:01
Show Gist options
  • Save renatosnrg/3369953 to your computer and use it in GitHub Desktop.
Save renatosnrg/3369953 to your computer and use it in GitHub Desktop.
Webform Widget
<a href="" id="social-id-campaign-link">teste</a>
<script>
//<![CDATA[
(function(w){
var s = w.document.createElement('script');
s.setAttribute('src', 'https://app.socialidnow.com/javascripts/marketing/registration_widget.js?1343653084');
s.setAttribute('type', 'text/javascript');
s.setAttribute('async', true);
var c = function(){
if(SocialId){
SocialId.Campaign.init({
url: 'https://app.socialidnow.com/marketing/campaigns/<id>/registrations/new',
closeLinkLabel: 'Close',
style: (w.navigator.userAgent.match(/MSIE/) ?
SocialId.Campaign.defaultIEStyle :
SocialId.Campaign.defaultStyle),
elementId: 'social-id-campaign-link',
doc: w.document
});
}
};
if(w.navigator.userAgent.match(/MSIE/)){
s.onreadystatechange = c;
}else{
s.addEventListener('load', c);
}
w.document.getElementsByTagName('head')[0].appendChild(s);
}(window));
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment