When doing a string replace in javascript if you try something like this: var str = ‘test’; str.replace(‘t’, ‘s’); You’ll find that the result is: sest The replace method in javascript is not a global replace. Instead it does a single replace and moves on. If you want to do a global replace try using…
Category: Javascript
Userfly Ruined My Weekend – “jQuery(“form.ajax”).ajaxForm is not a function”
I’ve been a big fan of Userfly because they make usability testing easy. Their tool is really quite amazing. However, this last weekend and into today I’ve become less of a fan. After a late night deploy last week on a site I’ve been working on I noticed that none of my javascript worked. Lucky…