Open FasterThanMyShadow opened 10 years ago
See the problem here too.
You can replace
replace("_"," ")
by
split("_").join(" ")
as its normally faster, as sugested in http://stackoverflow.com/a/1145525
OK, thanks for letting me know.
Joes
On 12 Mar 2014, at 15:19, lulis notifications@github.com wrote:
See the problem here too. You can replace replace(""," ") by split("").join(" ") as its normally faster, as sugested in http://stackoverflow.com/a/1145525
— Reply to this email directly or view it on GitHub.
I too also had this issue, I fixed it by amending the code like this: captions=params.listCaptions.replace(new RegExp("_", "g"),' ').split('|');
Hi Kris,
You mention that spaces in captions should be replaced with underscores. However, there seems to be a bug in nanoslider.js, line 43. You use replace('',' '), but that only replaces the first underscore in the string. You need to replace this with replace(//g,' ') to replace all underscores with a space.
I am using version 1.2.0.
Cheers.
Joes