문제

I'm generating a email from a web page and taking a section of the page and putting it into the email. The problem is the section of code has elements with "display: none;" and some email clients don't recognise the display:none property which then displays unwanted elements in the email.

I want to remove these elements using some simple javascript i already remove elements with certain classes now i want to remove elements with certain styles, the styles are inline. I'm using jquery with the site.

도움이 되었습니까?

해결책

Use the :hidden selector:

$(":hidden").remove();

다른 팁

  $("div[style*='display:none']").remove();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top