Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added separate linking from primary image panel #26

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

joeletherton
Copy link

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/" />

@greg01
Copy link

greg01 commented Jul 8, 2012

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;}

@Didi23
Copy link

Didi23 commented Aug 21, 2012

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

@joeletherton
Copy link
Author

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

@Didi23
Copy link

Didi23 commented Aug 22, 2012

@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?

Added an option "filmstrip_use_alt_click" to enable the film strip
to be clickable in the same fashion as other images.
@joeletherton
Copy link
Author

@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.

@Didi23
Copy link

Didi23 commented Aug 27, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants