GalleryView icon indicating copy to clipboard operation
GalleryView copied to clipboard

Added separate linking from primary image panel

Open joeletherton opened this issue 12 years ago • 6 comments

Added image linking directly for the panel. Added 2 options to support this linking (described below). The panel itself becomes a clickable link which can redirect to any url specified in the data-href attribute of the original image html.

New options: - panel_clickable - BOOLEAN: flag to indicate that the panel should have a clickable link - link_newwindow - BOOLEAN: flag to indicate that panel links should/should not open in a new window

Usage-script:

    $(function () {
        $('#myGallery').galleryView({
            panel_clickable: true,
            link_newwindow: false
        });
    });

Usage-html:

    <li><img src="myImage.jpg" data-href="http://www.google.com/" />

joeletherton avatar Jul 08 '12 00:07 joeletherton

Is it possible that the mouse pointer over the driving of the picture changes to a finger. Otherwise, the user has no idea that this is a picture link.

But one can also think about css: . gv_panel img {position: absolute; cursor: pointer;}

greg01 avatar Jul 08 '12 10:07 greg01

Thanks for great addition to primary panel images, but is it possible to make separate links from filmstrip? Maybe add filmstrip to "clickable" string?

Didi23 avatar Aug 21 '12 21:08 Didi23

@Didi23: I'm not sure what you mean. Are you referring to making the filmstrip images clickable to the alternate link?

joeletherton avatar Aug 22 '12 00:08 joeletherton

@joeletherton Yes. I have 2 different images, in primary panel I have advert and in filmstrip I have a brand name thumbnail image so people tend to click on filmstrip instead of primary panel to get to the page with that brand. So I need filmstrip images to be clickable to the alternate link. Can you please help me do it?

Didi23 avatar Aug 22 '12 11:08 Didi23

@Didi23: I added a new option to the code and some logic to operate it. If you set the boolean "filmstrip_use_alt_click" to true and the image clicked has a non-empty string in the data-href attribute, then it'll behave as if the primary image was clicked. Otherwise it will use default behavior.

joeletherton avatar Aug 27 '12 11:08 joeletherton

@joeletherton Thank you so much!!! It is exactly what I needed. You made my day. Again, thanks a lot :)

Didi23 avatar Aug 27 '12 22:08 Didi23