Skip to content

Instantly share code, notes, and snippets.

@tseplik
Forked from scottmagdalein/clickable-element.html
Last active June 3, 2016 13:23
Show Gist options
  • Select an option

  • Save tseplik/ae87e3b6826e5fc46938980683d2f15a to your computer and use it in GitHub Desktop.

Select an option

Save tseplik/ae87e3b6826e5fc46938980683d2f15a to your computer and use it in GitHub Desktop.

Revisions

  1. tseplik revised this gist Jun 3, 2016. 2 changed files with 11 additions and 9 deletions.
    10 changes: 9 additions & 1 deletion clickable-element.html
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    <!-- This is the HTML element that, when clicked, will cause the popup to appear. -->

    <button id="open-popup">Subscribe to our mailing list</button>
    <body>
    ...
    <button id="open-popup" class="btn btn-danger btn-lg btn-block" onclick="showMailingPopUp()">Subscribe!</button>
    ...

    <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script>
    <script src="assets/js/mailchimp_popup.js"></script>
    ...
    </body>
    10 changes: 2 additions & 8 deletions mailchimp_popup.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,4 @@
    <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script>

    <script>
    function showMailingPopUp() {
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"YOUR_UUID_GOES_HERE","lid":"YOUR_LID_GOES_HERE"}) })
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us12.list-manage.com","uuid":"YOUR_UUID_GOES_HERE","lid":"YOUR_LID_GOES_HERE"}) })
    document.cookie = "MCEvilPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
    };

    document.getElementById("open-popup").onclick = function() {showMailingPopUp()};
    </script>
    };
  2. @scottmagdalein scottmagdalein revised this gist Aug 21, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions mailchimp_popup.js
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@

    <script>
    function showMailingPopUp() {
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"YOUR_UUID_GOES_HERE","lid":"YOUR_LID_GOES_HERE"}) })
    document.cookie = "MCEvilPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
    };
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"YOUR_UUID_GOES_HERE","lid":"YOUR_LID_GOES_HERE"}) })
    document.cookie = "MCEvilPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
    };

    document.getElementById("open-popup").onclick = function() {showMailingPopUp()};
    document.getElementById("open-popup").onclick = function() {showMailingPopUp()};
    </script>
  3. @scottmagdalein scottmagdalein revised this gist Aug 21, 2015. No changes.
  4. @scottmagdalein scottmagdalein revised this gist Aug 21, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions clickable-element.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <!-- This is the HTML element that, when clicked, will cause the popup to appear. -->

    <button id="open-popup">Subscribe to our mailing list</button>
  5. @scottmagdalein scottmagdalein revised this gist Aug 21, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mailchimp_popup.js
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    <script>
    function showMailingPopUp() {
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"2f8b8f2b0310a55b5fda25166","lid":"24ea895039"}) })
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"YOUR_UUID_GOES_HERE","lid":"YOUR_LID_GOES_HERE"}) })
    document.cookie = "MCEvilPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
    };

  6. @scottmagdalein scottmagdalein created this gist Aug 21, 2015.
    10 changes: 10 additions & 0 deletions mailchimp_popup.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script>

    <script>
    function showMailingPopUp() {
    require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"2f8b8f2b0310a55b5fda25166","lid":"24ea895039"}) })
    document.cookie = "MCEvilPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
    };

    document.getElementById("open-popup").onclick = function() {showMailingPopUp()};
    </script>