Why I ask an easy question:
Hi, lots of people asked how to split an string in javascript by multiple values, but I don't understand how it works the /[^\w\s]|_/
in the split asked, so I don't know how to modify it so it matches my goal.
What I need:
I have a textarea in my html, so the users can write words formatted in multiple ways (always text, if they type numbers it will treated as text).
My code:
<div class="ui-block-c">
<textarea id="writtenWord" rows="1" cols="50"></textarea>
</div>
var writtenWord = document.getElementById("writtenWord");
var theWord = writtenWord.value.toUpperCase();
res = theWord.split(" ");
for (var i = res.length - 1; i >= 0; i--) {
ArrayWords.push(res[i]);
};
What I want:
To understand how it works so I can change the conditions + a working example that will split words, even if user press enter key or types 5 spaces...
Used libraries: jquery-ui-1.9.1 and jquery-1.8.2 I have one widget with some function called from destroy $.widget("my.customwidget", { options: { }, _destroy: function () { ...
Used libraries: jquery-ui-1.9.1 and jquery-1.8.2 I have one widget with some function called from destroy $.widget("my.customwidget", { options: { }, _destroy: function () { ...
I'm developping an angularjs (v1.2.26) application. And I used KeePass (v2.28), chromeIPass 2.6.8 (google chrome extension) to fill credentials. I got an issue with the login form: Keepass allow to ...
I'm developping an angularjs (v1.2.26) application. And I used KeePass (v2.28), chromeIPass 2.6.8 (google chrome extension) to fill credentials. I got an issue with the login form: Keepass allow to ...
Can I load jQuery migrate via RequireJS? I don't understand how the timing can be handled correctly. See this example: require([ 'jquery', 'jqmigrate' ], function ($) { if ($.browser.msie) {...}...
Can I load jQuery migrate via RequireJS? I don't understand how the timing can be handled correctly. See this example: require([ 'jquery', 'jqmigrate' ], function ($) { if ($.browser.msie) {...}...
Does JWPlayer support the file source from soundcloud? <script type="text/javascript" language="javascript"> jwplayer("mainplayer").setup({ playlist: [{ ...
Does JWPlayer support the file source from soundcloud? <script type="text/javascript" language="javascript"> jwplayer("mainplayer").setup({ playlist: [{ ...