substring - Change string using JQUERY? -
i have js
var link ="#step-2";
what need new string this
var newlink = "step 2";
i hope simple solution using jquery?
you don't want trim (trim()
, , $.trim()
, removes leading, , trailing, white-space string, not special, or otherwise-identified, characters) string; need, instead, utilize replace()
:
var link ="#step-2", newlink = link.touppercase().replace(/[#-]/g, function (a){ homecoming === '#' ? '' : ' '; });
jquery substring trim
No comments:
Post a Comment