Is it possible to collapse / expand the DIV in an email? Which customers support this?

I have an alert system that sends email alerts. I would like to include diagnostic information, but only make it visible if the end user clicks the [+] button.

Can this be done by email? Can I do this without using Javascript and only CSS?

If this helps, most of my clients use Outlook, iPhones or Blackberries.

+4
source share
4 answers

Most likely no. JS is disabled on many clients due to viruses, etc.

A workaround may be to include the URL on a full error page with all the information and edit the mail to summarize the diagnostic information.

Alternatively, you can try to see if you can use :hover CSS to show an element with some nasty selectors ... CSS3-style? http://www.campaignmonitor.com/css/

+2
source

You can do this with a checkbox, but I don’t know if it is cross-client compatible. I would check it out completely. Here is some more info:

Show and hide checkbox condition with css

There are several other examples on the Internet. Here is a really good working example on Litmus that uses a hamburger menu:

https://litmus.com/community/discussions/999-hamburger-in-email

+2
source

I don’t think you can, email clients will not let you run javascript code due to security issues. And you cannot do what you want using CSS only.

0
source

you cannot respond to click events without js.

you can try the approach using :hover in css, but I'm not sure how much email clients support it

0
source

All Articles