]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Update language to directive form
authorKevin Ball <kmball11@gmail.com>
Tue, 2 Aug 2016 20:45:12 +0000 (13:45 -0700)
committerKevin Ball <kmball11@gmail.com>
Tue, 2 Aug 2016 20:45:12 +0000 (13:45 -0700)
docs/assets/js/docs.ad.js

index f908749aa596a518556068f2eef64c8c3b27306a..e1529cacdd6cb86795f5cbc684ac646c2db48bf2 100644 (file)
@@ -1,29 +1,16 @@
-var _kmq = _kmq || [];
 $(function() {
 
-   // No need to do a timeout for default case, if KM times out just don't show ad.
-   _kmq.push(function(){
-    // Set up the experiment (this is the meat and potatoes)
-    var type = KM.ab("Foundation Docs Upsell Type", ["question", "directive"]);
+  // TODO: Add alternate between advanced and intro
+  var topic = $('h1.docs-page-title').text();
+  var header = 'Master ' + topic;
+  var body = 'Get up to speed FAST, learn straight from the experts who built Foundation.';
+  var link = 'http://zurb.com/university/foundation-intro?utm_source=Foundation%20Docs&utm_medium=Docs&utm_content=Struggling&utm_campaign=Docs%20To%20Intro';
+  var cta = 'Learn More';
 
-    // TODO: Add alternate between advanced and intro
-    var topic = $('h1.docs-page-title').text();
-    var header;
-    if (type === 'directive') {
-      header = 'Master ' + topic;
-    } else {
-      header = 'Struggling with ' + topic + '?';
-    }
-    var body = 'Get up to speed FAST, learn straight from the experts who built Foundation.';
-    var link = 'http://zurb.com/university/foundation-intro?utm_source=Foundation%20Docs&utm_medium=Docs&utm_content=Struggling&utm_campaign=Docs%20To%20Intro';
-    var cta = 'Learn More';
-
-    var html = '<div class="ad-unit"><h3 class="ad-unit-title">' + header + '</h3>' +
-               '<p class="ad-unit-text">' + body + '</p>' +
-               '<a class="button ad-unit-button" href="' + link+ '">' +
-               cta + '</a></div>';
-    $('#TOCAdUnit').html(html);
-
-  });
+  var html = '<div class="ad-unit"><h3 class="ad-unit-title">' + header + '</h3>' +
+             '<p class="ad-unit-text">' + body + '</p>' +
+             '<a class="button ad-unit-button" href="' + link+ '">' +
+             cta + '</a></div>';
+  $('#TOCAdUnit').html(html);
 
 });