Solved

how to add a space in javascript

Posted on 2011-09-02
3
303 Views
Last Modified: 2012-05-12
how can i add a space before the word play? it is javascript. so i want something like ('  play') but that doesnt work...thanks

$(this).text('play');
0
Comment
Question by:CCLCLS
  • 2
3 Comments
 
LVL 28

Expert Comment

by:sammySeltzer
ID: 36474408
some like \

$(this).text('\play');
0
 
LVL 28

Accepted Solution

by:
sammySeltzer earned 500 total points
ID: 36474429
or


$(this).text('\xa0play');
0
 
LVL 3

Expert Comment

by:russellC
ID: 36474465
$(this).text(" " + "play");
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question