Whenever you try to write a script in Javascript that requires a string of multiple lines get an error code that is poorly trained. That is a problem for these scripts to generate HTML content, because by having a clear line and we lose we do not see exactly what you’re painting.
$('#ID').append(
'<div id="wcDIV"> \
<p>Welcome to WiseCodes.Com!</p> \
</div>'
);
var strWelcome = 'Welcome \
to WiseCodes.Com!'
The key is used (\) to indicate the line, that mysteriously causes the browser detects that it is a single line, making the job of uniting us.
A curiosity of this language that helps us to make things easier and above all clear.
Happy Programming !!!
Tags: JAVASCRIPT, OpenSource
I tried this technique a few years ago, but it didn’t work in some browsers. Perhaps things are better nowadays. Thanks for the tip!
Searching for this for some time now – i guess luck is more advanced than search engines
That was a fairly useful insight for me personally