Solved

how to add a space in javascript

Posted on 2011-09-02
3
298 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now