jQuery(this).html(jQuery(this).html() == '▼ SHOW ▼' ? '▲ HIDE ▲' : '▼ SHOW ▼');
This will toggle the text as requested but it shows the
▼
as the html and not as the ▼
anyone have any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The problem is that the html (or text) content you get from the element content is already transformed. So the
▼doesn’t exist anymore.If this script is in UTF-8, you may do this :
EDIT, Another simpler version not needing UTF-8 :