Subscribe for complete access to 158 years of independent journalism
You have three free articles remaining.
You have two free articles remaining.
(function(w,d,s,c,u){
var qf=function(e,a){(w[c].q=w[c].q||[]).push([e,a]);};w[c]=w[c]||qf;
var st=d.createElement(s);
var fs=d.getElementsByTagName(s)[0];
st.async=1;st.src=u;fs.parentNode.insertBefore(st,fs);
})(window,document,'script','chartbeat','https://static.chartbeat.com/js/subscriptions.js');
jQuery( document ).ready(function($) {
jQuery(document).on("click",".subscribepaywall",function(e){
chartbeat('trackPaywallStart', {
// debug : true,
eventLabel : 'Non Logged in User Subscription Paywall' // optional
} );
});
});
function divFunction(){
jQuery(".complete-access").toggleClass("collapse");
}
jQuery('.down-arrow').click(function(){console.log("tet")});
// This is the listener that will receive the post message from your front-end JS in case of an error.
window.addEventListener("message", function (e) {
// We verify that the error message is coming from Piano, so it must be what we're looking for.
if (typeof e.data.piano != 'undefined') {
// Get the object with the result.
var result = e.data.piano;
// We know how this object should be structured, so we're checking for the "success" field.
// We're expecting it to be false, so we can show an error message.
if (!result.success) {
/*ga('send', 'event', 'piano-paywall-june', 'piano-paywall-meerkat-signup-form-submit-non-subscriber', e.origin);*/
// Append the text message into the block.
jQuery('.meerkat__title').addClass('hide');
jQuery('.content__signup').addClass('hide');
jQuery('.login__para').addClass('hide');
jQuery('#'+result.message).toggleClass('hide');
jQuery('.content_button_block').toggleClass('hide');
}
}
return;
}, false);