Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with Thumbnail Grid with Expanding Preview

Featured Replies

Hi Guys,

Ok this may be a long one,

I am using this source code for my site Thumbnail Grid with Expanding Preview | Codrops

It looks very similar if not the same as google images when you click on an image,

now the problem I have is that I do not know how to add more features into the drop down box, if you go onto google images and click an image the drop down shows multiple things including more images and links to the source of the image and video links,

I need to know how to edit the source code from the above site to add more features than just the title, description and one link,

Any help is much appreciated,


Many thanks
Marko

Hello Marko,

 

What features do you want to add precisely? Do you want it to work exactly the same as Google images, or do you want to add different features into the drop down box?

 

Google probably uses some sort of advanced server-side script to generate the similar images features and things like that. If you are looking for simpler features, you will probably need to treat them more or less independently from the drop down functionality. Are you familiar with javascript/jQuery?

 

Cheers,

Zach

Also, thinking about you, you could fairly easily recreate the "similar images" feature in with pure HTML/Javascript, but it would be quite manual. If you are not planning on having too many images it could be very managable, using classes or data attributes to group images.

  • 3 months later...

now guys my own problem is; I want to implement "color-thief.js" on the expanded preview image.. but somehow, it seems "color-thief.js" doesnt work on dynamically generated image. (I might be VERY wrong tho). I put a portion of my site at http://redcrosscds.site11.com/ (yea, freehosting) :-). ...with all the necessary plugins included.. I'd be very glad if I could be shown what I'm not getting right, as I'm really new to Javascript. Thanx.

 

PS: --- notice I used the code;

$("#target").load( function(){
            var colorThief = new ColorThief();
            var color = colorThief.getColor(this);
            $("#og-grid > li.og-expanded > div.og-expander").css("background", "rgb(" + color + ")");
       //document.getElementById("og-grid").style.backgroundColor = "rgb(" + color + ")";
    }); 

in the included "ctrl-s.js" file on the page.

 

--- sorry Marko for "hijacking" your topic, I didn't want to create another topic that'll most likely have a similar heading to yours.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.