I cannot upgrade my jQuery, and I was wondering why this function is not existing. How can I implement this:
$('#block-block-1 .content').replace(/^\s*|\s*$/g,'');
What I get is: “function doesn’t exist”
thanks
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.
If I’m reading this right, you want to change the text of that particular element. You can do this using the
.textmethod. We useelement.text()to retrive the text andelement.text(newText)to set it. We can combine both to alter it.If you want to work with multiple elements, you can use the
.eachmethod to operate on each one separately.