Welcome To Snipplr

Everyone's Recent JavaScript Snippets Tagged replace

« Prev 1 Next »
Converte tutti gli \n in <br>
0 411 posted 10 years ago by kajinka13
two awesome bits: using ''.replace() perform an action (other than replacing it) on some text, and a simple way to concatenate strings with a separator (retardedly simple but it always confuses me)
0 443 posted 11 years ago by ultranaut
0 386 posted 11 years ago by dato
image rollovers in jquery are usually super easy. However it sucks when working with absolute image paths - like a separate media server or CDN. Heres a quick snippet using substring and lastIndexOf to swap out the image src.
0 514 posted 11 years ago by inreflection7
It’s pretty straightforward, we loop the existing Views of the ScrollableView and copy each View, replacing the one to be change, to a new array. Then we tell the ScrollableView to use our new Views-array for it’s Views. I hope this helps someon...
0 440 posted 11 years ago by chlab
Normal replace() function only replaces first instance.
1 558 posted 11 years ago by rumremix
useful if you only want digits as input
0 303 posted 12 years ago by webstylr
These are essential javascript techniques every javascriptr must know. I will be adding more to this list, let me know what you'd like to see. Thanks!
0 374 posted 12 years ago by alvincrespo
This will need to be either embeded or included and you can then just use this as such myNewString = myStringVariable.nl2br();
0 409 posted 12 years ago by boondoklife
0 323 posted 12 years ago by aadsm
I'll never learn how to use this Markdown system. Anyway, here is the fixed code based on my comment on the following page: http://snipplr.com/view/14206/replace-spaces-with-underscores/ I'm sorry, I don't mean to hijack the code. :(
0 513 posted 13 years ago by duniyadnd
strip non alphanumerical characters while typing
1 365 posted 14 years ago by ginoplusio
Ability to change/add attributes to HTML using JQuery
1 345 posted 14 years ago by davebowker
Why doesn't this work?
1 405 posted 15 years ago by gaunab
Usefull Regular Expressions enhancement. Simplifies standard string operations escaping special chars. And also saves precompiled REs for a speed increase.
1 540 posted 16 years ago by cochambre
« Prev 1 Next »