Home › Forums › Newsletter Plugin Support › Unclickable "Read More" Button on Email and Mobile
- This topic has 4 replies, 4 voices, and was last updated 5 years, 1 month ago by nikdow.
-
AuthorPosts
-
June 20, 2019 at 2:19 am #180393maristelarParticipant
Hi,
I created a newsletter with some custom HTML blocks to display multiple news articles each with a “Read More/Read less” button, which expands/minimizes text. It seems to work when I click on the “View Online” I included in the pre-Header, but nothing happens when I click on Read More from the email itself on desktop and mobile. I’m unfamiliar with the Javascript included in the code that I took from a W3Schools How-To. I’m wondering if I need to include something else for the code to work in an email, or if I need to re-arrange/fix anything.Here’s the code for two separate blocks of custom HTML for the two articles. The second one is basically identical except for function names:
<head>
<style>
#more {display: none;}
</style>
</head><div class=”article” style=”text-align:left;”>
<h2>Headline</h2>
<p> By EnterName </p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas vitae scel<span id=”dots”>…</span><span id=”more”>erisque enim ligula venenatis dolor. Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Nunc sagittis dictum nisi, sed ullamcorper ipsum dignissim ac. In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta.</span></p>
</div>
<button onclick=”myFunction()” id=”myBtn”>Read more</button><script>
function myFunction() {
var dots = document.getElementById(“dots”);
var moreText = document.getElementById(“more”);
var btnText = document.getElementById(“myBtn”);if (dots.style.display === “none”) {
dots.style.display = “inline”;
btnText.innerHTML = “Read more”;
moreText.style.display = “none”;
} else {
dots.style.display = “none”;
btnText.innerHTML = “Read less”;
moreText.style.display = “inline”;
}
}
</script>———————————————————————————————–
<div class=”article2″ style=”text-align:left;”>
<h2>Headline</h2>
<p>EnterName </p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas vitae scel<span id=”dots2″>…</span><span id=”more2″>erisque enim ligula venenatis dolor. Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Nunc sagittis dictum nisi, sed ullamcorper ipsum dignissim ac. In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta.</span></p>
</div><button onclick=”myFunction2()” id=”myBtn2″>Read more</button>
<script>
function myFunction2() {
var dots2 = document.getElementById(“dots2”);
var moreText2 = document.getElementById(“more2”);
var btnText2 = document.getElementById(“myBtn2”);if (dots2.style.display === “none”) {
dots2.style.display = “inline”;
btnText2.innerHTML = “Read more”;
moreText2.style.display = “none”;
} else {
dots2.style.display = “none”;
btnText2.innerHTML = “Read less”;
moreText2.style.display = “inline”;
}
}
</script>June 21, 2019 at 7:45 am #180648StefanoKeymasterHi, you cannot use javascript in emails.
Stefano.
August 16, 2019 at 1:54 am #209141nikdowParticipantHi Stefano, thanks for great plugin. In combination with AWS SES we can send out our newsletters at much lower cost than MailChimp.
Plus I hope you are enjoying your August holiday!Please consider this request: Give us a way to include “more…” link at the end of the sample text in the email. We are using Automated, runs every morning and if a blog article was published, it gets sent out. But we get much feed-back asking how to find the whole article, because there is no “more…” link. Also if you click on “Click here if this email doesn’t show properly” that opens the newsletter itself, which is logical, but no “more…” link on the web version either.
I’m just responding to feedback from the customers, they can’t find the blog post to read!
October 13, 2019 at 10:53 pm #241776txbesthempParticipantHi @ nikdow – were you able to find a solution to your issue with the “more” link to the article? I’m considering switching from Mailchimp and the Automated feature is attractive except for the limitation you described above. Thanks! LN
October 13, 2019 at 11:17 pm #241777nikdowParticipantNo, Stefano and team have not acted on this request. It would be easy to add a more… link, the text and the featured image of the page are both links to the specific blog post already, and that works perfectly – but many users don’t realise they can click on it.
-
AuthorPosts
- You must be logged in to reply to this topic.