Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8904765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:13:10+00:00 2026-06-15T02:13:10+00:00

We have a title <title>Text &#8211; text</title> I want to change it with jquery

  • 0

We have a title

<title>Text &#8211; text</title>

I want to change it with jquery

$('title').html($('title').html().replace('Text-text', ''));

But it doesn’t work…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:13:11+00:00Added an answer on June 15, 2026 at 2:13 am

    Use .text() to replace the contents:

    $('title').text('Text-text');
    

    .html() is overkill if there’s no actual HTML inside there.

    To only replace certain characters in the title, use a callback function:

    $('title').text(function(i,str) {
        return str.replace('replace this','with this');
    });
    

    To replace special characters, you’ll need to use their Unicode encoding, which I found here by googling “unicode 8211”:

    $('title').text(function(i,str) {
        return str.replace('\u2013','-');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text title that reads This User The Title Of The Post
I have two Tables: Table 1: Questions : QuestionId NUMERIC Title TEXT Test Data
I have this code: $.getJSON(Featured/getEvents, function(data){ $.each(data.events, function(i,event){ var title = event.title.substr(0,20); $(#title-+i).text(Text); if
I have a text like: Title A some description on a few lines, there
I have model Article it has field title with some text that may contain
I have a text file with the format: (title,price,id#) CD1,11.00,111111 CD2,12.00,222222 CD3,13.00,333333 CD4,14.00,444444 CD5,15.00,555555
I have text documents like the following which contain single and multiple variables: title::
I have a description text file with content constructed in such manner: Book title
i have this <li><a href=# >title</a> <span style='text-align:right;'>(0)</span></li> its not working and this <li><a
Suppose I have: <a href=http://www.yahoo.com/ target=_yahoo title=Yahoo!&#8482; onclick=return gateway(this);>Yahoo!</a> <script type=text/javascript> function gateway(lnk) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.