jQuery Image Replace using substring


/ Published in: JavaScript
Save to your folder(s)

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.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.