Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged replace



« Prev 1 Next »
Converte tutti gli \n in <br>
0 551 posted 12 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 574 posted 12 years ago by ultranaut
0 539 posted 12 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 648 posted 12 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 563 posted 12 years ago by chlab
Normal replace() function only replaces first instance.
1 764 posted 13 years ago by rumremix
useful if you only want digits as input
0 420 posted 13 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 488 posted 14 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 568 posted 14 years ago by boondoklife
0 441 posted 14 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 691 posted 14 years ago by duniyadnd
strip non alphanumerical characters while typing
1 508 posted 15 years ago by ginoplusio
Ability to change/add attributes to HTML using JQuery
1 478 posted 15 years ago by davebowker
Why doesn't this work?
1 552 posted 17 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 688 posted 17 years ago by cochambre
« Prev 1 Next »