![]() ![]() We can remove the src attribute of an tag to hide an image. Well, I had two thoughts here as to how to build this chap (the golden rule is that there’s never one way to build anything on the web). So! What if we could show images on a website but only once they are clicked or tapped? Wouldn’t it be neat if we could show a placeholder and swap it out for the real image on click? Something like this: Did I just show you an image in a blog post that insults the very concept of images? Yep! Sue me. ![]() Isn’t it… just so great?! It’s readable! There’s no junk all over the place, it respects me as a user and - sweet heavens - is it fast. First, copy this script into the section of your page:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |