Profile
Achievement
inreflection7's Recent SnippetsTagged replace
- All /
« Prev 1 Next »
Search for a string, if matched replace with second provided paramater. Third parameter is the variable whose value is the string you'd like to search.
0
862
posted 12 years ago by inreflection7
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
839
posted 13 years ago by inreflection7