GithubHelp home page GithubHelp logo

jquery.poptrox's Introduction

A lightbox gallery plugin for jQuery

Adds lightbox galleries to jQuery. Heavily customizable, easy to use, and built to support images, videos (YouTube, Vimeo, Wistia, Brightcove), Soundcloud tracks, IFRAMEs, and AJAX content.

Requires jQuery 1.7+.

Usage

Load it after jQuery:

<script src="http://code.jquery.com/jquery-x.x.x.min.js"></script>
<script src="jquery.poptrox.min.js"></script>

Set up your gallery:

<div id="gallery">
	<a href="path/to/image1.jpg"><img src="path/to/image1_thumbnail.jpg" /></a>
	<a href="path/to/image2.jpg"><img src="path/to/image2_thumbnail.jpg" /></a>
	<a href="path/to/image3.jpg"><img src="path/to/image3_thumbnail.jpg" /></a>
	<a href="path/to/image4.jpg"><img src="path/to/image4_thumbnail.jpg" /></a>
	<a href="path/to/image5.jpg"><img src="path/to/image5_thumbnail.jpg" /></a>
	<a href="path/to/image6.jpg"><img src="path/to/image6_thumbnail.jpg" /></a>
</div>

And call poptrox() on it:

var foo = $('#gallery');
foo.poptrox();

Notes

  • Poptrox parses all anchors inside the element you call it on, even if they're nested in other stuff. For example, this would totally work:
<div id="gallery">
	<section>
		<h2>Stuff I Like</h2>
		<ul>
			<li><a href="path/to/image1.jpg"><img src="path/to/image1_thumbnail.jpg" /></a></li>
			<li><a href="path/to/image2.jpg"><img src="path/to/image2_thumbnail.jpg" /></a></li>
			<li><a href="path/to/image3.jpg"><img src="path/to/image3_thumbnail.jpg" /></a></li>
		</ul>
	</section>
	<section>
		<h2>Stuff I Don't Like</h2>
		<ul>
			<li><a href="path/to/image1.jpg"><img src="path/to/image1_thumbnail.jpg" /></a></li>
			<li><a href="path/to/image2.jpg"><img src="path/to/image2_thumbnail.jpg" /></a></li>
			<li><a href="path/to/image3.jpg"><img src="path/to/image3_thumbnail.jpg" /></a></li>
		</ul>
	</section>
</div>
  • Each anchor must link to whatever you want shown in its popup, be it an image or something else (see below).

  • If you want captions on your popups, enable usePopupCaption (see below) and assign a title attribute to your <img> element, like so:

<a href="path/to/image.jpg"><img src="path/to/image_thumbnail.jpg" title="This right here is a caption." /></a>
  • You can also use the caption option to tell Poptrox where it should look for captions:
caption: null

The default behavior, which simply uses the title attribute of each <img> element.

caption: { selector: "xxxxxx" }

Uses the content of the element pointed to by the selector xxxxxx (must be inside the anchor).

caption: { selector: "xxxxxx", remove: true }

Uses the content of the element pointed to by the selector xxxxxx (must be inside the anchor), then removes the element.

caption: function(a) { /* return something */ },

(Advanced) Uses a callback function to figure out the caption, where a is a jQuery object pointing to the anchor tag.

Supported Types

In addition to images, popups can also show other stuff (like YouTube videos). To do this, point your thumbnail's anchor to the appropriate URL (see below for specifics) and give it a data-poptrox attribute like so:

<a href="http://untitled.tld/path/to/whatever" data-poptrox="type,(width)x(height)"><img src="path/to/thumbnail.jpg" /></a>

The data-poptrox attribute breaks down like this:

  • type: The type (eg. youtube)
  • (width)x(height): An optional width and height for the popup (eg. 800x400)

YouTube Videos

  • Link format: http://youtu.be/xxxxxxxxxxx (found via the "Share" link)
  • Type: youtube
  • Example:
<a href="http://youtu.be/loGm3vT8EAQ" data-poptrox="youtube,800x480"><img src="path/to/thumbnail.jpg" /></a>

Vimeo Videos

  • Link format: http://vimeo.com/xxxxxxxx (found via the "Share" button under "Embed")
  • Type: vimeo
  • Example:
<a href="http://vimeo.com/22439234" data-poptrox="vimeo,800x480"><img src="path/to/thumbnail.jpg" /></a>

Wistia Videos

  • Link format: http://fast.wistia.net/embed/iframe/fe8t32e27x (found via "Share" or "Get Link")
  • Type: wistia
  • Example:
<a href="http://fast.wistia.net/embed/iframe/fe8t32e27x" data-poptrox="wistia,800x480"><img src="path/to/thumbnail.jpg" /></a>

Brightcove Videos

  • Link format: http://bcove.me/xxxxxxxx (found via "Share" or "Get Link")
  • Type: bcove
  • Example:
<a href="http://bcove.me/qly3wjdw" data-poptrox="bcove,636x360"><img src="path/to/thumbnail.jpg" /></a>

Soundcloud Tracks

  • Link format: https://api.soundcloud.com/tracks/xxxxxxxx (found via the "Share" button under "Widget Code" or "WordPress Code")
  • Type: soundcloud
  • Example:
<a href="https://api.soundcloud.com/tracks/93549370" data-poptrox="soundcloud"><img src="path/to/thumbnail.jpg" /></a>

IFRAMEs

  • Link format: Anything.
  • Type: iframe
  • Example:
<a href="path/to/whatever.html" data-poptrox="iframe,600x400"><img src="path/to/thumbnail.jpg" /></a>

AJAX Content

  • Link format: Anything (as long as it's on the same domain)
  • Type: ajax
  • Example:
<a href="path/to/whatever.html" data-poptrox="ajax,600x400"><img src="path/to/thumbnail.jpg" /></a>

Ignore

This "special" (unspecial?) type just tells Poptrox to treat whatever's in href as if it were a normal link.

  • Link format: Anything.
  • Type: ignore
  • Example:
<a href="http://n33.co" data-poptrox="ignore"><img src="path/to/thumbnail.jpg" /></a>

Config

poptrox() has numerous options one can use or override, if one were so inclined:

foo.poptrox({
	preload:					false,			// If true, preload fullsize images in
												// the background
	baseZIndex:					1000,			// Base Z-Index
	fadeSpeed:					300,			// Global fade speed
	overlayColor:				'#000000',		// Overlay color
	overlayOpacity:				0.6,			// Overlay opacity
	windowMargin:				50,				// Window margin size (in pixels; only comes into
												// play when an image is larger than the viewport)
	windowHeightPad:			0,				// Window height pad
	selector:					'a',			// Anchor tag selector
	caption:					null,			// Caption settings (see docs)
	popupSpeed:					300,			// Popup (resize) speed
	popupWidth:					200,			// Popup width
	popupHeight:				100,			// Popup height
	popupIsFixed:				false,			// If true, popup won't resize to fit images
	useBodyOverflow:			true,			// If true, the BODY tag is set to overflow: hidden
												// when the popup is visible
	usePopupEasyClose:			true,			// If true, popup can be closed by clicking on
												// it anywhere
	usePopupForceClose:			false,			// If true, popup can be closed even while content
												// is loading
	usePopupLoader:				true,			// If true, show the popup loader
	usePopupCloser:				true,			// If true, show the popup closer button/link
	usePopupCaption:			false,			// If true, show the popup image caption
	usePopupNav:				false,			// If true, show (and use) popup navigation
	usePopupDefaultStyling:		true,			// If true, default popup styling will be applied
												// (background color, text color, etc)
	popupBackgroundColor:		'#FFFFFF',		// (Default Style) Popup background color (when 
												// usePopupStyling = true)
	popupTextColor:				'#000000',		// (Default Style) Popup text color (when
												// usePopupStyling = true)
	popupLoaderTextSize:		'2em',			// (Default Style) Popup loader text size
	popupCloserBackgroundColor:	'#000000',		// (Default Style) Popup closer background color
												// (when usePopupStyling = true)
	popupCloserTextColor:		'#FFFFFF',		// (Default Style) Popup closer text color (when
												// usePopupStyling = true)
	popupCloserTextSize:		'20px',			// (Default Style) Popup closer text size
	popupPadding:				10,				// (Default Style) Popup padding (when
												// usePopupStyling = true)
	popupCaptionHeight:			60,				// (Default Style) Popup height of caption area
	popupCaptionTextSize:		null,			// (Default Style) Popup caption text size
	popupBlankCaptionText:		'(untitled)',	// Applied to images that don't have captions
												// (when captions are enabled)
	popupCloserText:			'&#215;',		// Popup closer text
	popupLoaderText:			'&bull;&bull;',	// Popup loader text
	popupClass:					'poptrox-popup',// Popup class
	popupSelector:				null,			// (Advanced) Popup selector (use this if you 
												// want to replace the built-in popup)
	popupLoaderSelector:		'.loader',		// (Advanced) Popup Loader selector
	popupCloserSelector:		'.closer',		// (Advanced) Popup Closer selector
	popupCaptionSelector:		'.caption',		// (Advanced) Popup Caption selector
	popupNavPreviousSelector:	'.nav-previous',// (Advanced) Popup Nav Previous selector
	popupNavNextSelector:		'.nav-next',	// (Advanced) Popup Nav Next selector
	onPopupClose:				null,			// Called when popup closes
	onPopupOpen:				null			// Called when popup opens
});

License

jquery.poptrox.js is released under the MIT license.

Copyright © n33

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jquery.poptrox's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery.poptrox's Issues

VIMEO Fullscreen don't work

Fullscreen button on the vimeo player forces the whole site into full screen mode but not video itself. Even your newest poptrox 2.3.3 demo page have the same issue. Can You fix it somehow?

popup windows sizing

I am trying to set the windows size for some videos that I am showing but for some reason the popupwidth or popup height doesn't seem to be doing anything. Also I am was trying to remove the white space where the caption is but the popupcaptionheight doesn't seem to be doing anything either. Is there another place or something that I need to set the size of this window?

SSL for YouTube links

Has anyone come up with a creative way to enforce YouTube videos to play over SSL?

I use the https protocol in the links given to poptrox and Firefox blocks the content.

The web application is all delivered over SSL.

data-poptrox="ignore" jump when gallery is loading

Hi, if you filter an anchor via "ignore" then when you load del list jump the number of times you use the filter. ej.:
<div id="gallery">
<h2><a data-poptrox="ignore" href="#">Skip</h2>
<ul>
<li><a href="path/to/image1.jpg"><img src="path/to/image1_thumbnail.jpg" /></a></li>
<li><a href="path/to/image2.jpg"><img src="path/to/image2_thumbnail.jpg" /></a></li>
</ul>
</div>
then when you click on image1.jpg will show you image2.jpg and so on...
There is a way to fix this.

ignore option, index error

When the ignore option is used, the queue index/navPos count still includes these a's, causing incorrect objects to be referenced during navigation. The error is hack-fixed by: adding an object for the ignore type in the initial setup, then checking for and skipping it in poptrox_next, poptrox_previous, and poptrox_open.

Poptrox doesn't work with jQuery 3.1.0

After clicking on an image, I get the following errors"

TypeError: a.indexOf is not a function
r.fn.load()
 jquery.min.js:4
e.fn.poptrox/<()
 jquery.poptrox.min.js:2
r.event.dispatch()
 jquery.min.js:3
r.event.add/q.handle()
 jquery.min.js:3
.trigger()
 jquery.min.js:4
.trigger/<()
 jquery.min.js:4
.each()
 jquery.min.js:2
r.prototype.each()
 jquery.min.js:2
.trigger()
 jquery.min.js:4
e.fn.poptrox/</<()
 jquery.poptrox.min.js:2
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.fireWith()
 jquery.min.js:2
gb/i()
 jquery.min.js:3
r.fx.tick()
 jquery.min.js:3
ab()
 jquery.min.js:3
 jquery.min.js:4:18715

And after a while

too much recursion
.camelCase()
 jquery.min.js:2
U.prototype.get()
 jquery.min.js:3
.trigger()
 jquery.min.js:4
.trigger/<()
 jquery.min.js:4
.each()
 jquery.min.js:2
r.prototype.each()
 jquery.min.js:2
.trigger()
 jquery.min.js:4
e.fn.poptrox/</</<()
 jquery.poptrox.min.js:2
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()
 jquery.min.js:3
r.speed/e.complete()
 jquery.min.js:3
r.Callbacks/i()
 jquery.min.js:2
r.Callbacks/j.add()
 jquery.min.js:2
gb()
 jquery.min.js:3
.animate/g()
 jquery.min.js:3
.dequeue()

Gallery fails to load using jQuery 3.0.0+

My gallery does not load when I use any version of jQuery beyond 2.2.4 (which does work). Clicking on the thumbnail image simply pops up a small lightbox with grey loading dots that does not go away. There is no way to get out of the popup without reloading the page (no X button and clicking outside doesn't work).

Switching my jQuery script to grab version 2.2.4 from the CDN makes everything work though, so there is a compatibility issue somewhere.

Youtube nav

hi, the nav and close buttons disappear when using YouTube videos

Adding an element

How Can I add a clickable button next to the caption after it pops-up???

wordpress 3.9.1 - Uncaught TypeError: Cannot call method 'match' of undefined

Hi,

I'm currently converting your 'big picture' template freebie into WP theme (WP 3.9.1), I've encountered this issue for jquery.poptrox.. Any thoughts?

BTW, I find it weird that the built-in jquery version of WP doesn't work well with the skel.js, although they have the same version. 1.11.0, I solved it by replacing the WP jquery version with the jquery file included in the template.

Div under html

Hi
I am using poptrox (and I love it) and while generating a html snapshot with crawljax I found a div generated from poptrox which is directly under the html tag. I suppose that is the necessary, the question is could it be also under the body tag? Because this will mess up the html snapshot and I have now 2 body tags.

Thanks,
Stef

popupIsFixed: true is ignored

Hey,

I getting this error when open at second time the same modal

on first time:
image

after first time:
image

I'm using this popupIsFixed: true but after first time it's appears ignored.
Another observation is the miss of overflow scroll when in mobile, bacause images is greater than body and after resized become unreadable.

Brightcove capability

I'd like to be able to use Brightcove videos in a poptrox gallery. Would that be possible? I just see support for YouTube and Vimeo.

Thanks for your help.

TypeError: tmp is null

I'm auto generating links in multiple poptrox containers:

http://jsfiddle.net/oshihirii/E2GZR/

And coming across this error in Firebug > Console > Errors:

TypeError: tmp is null
x.src = x.prefix + '://www.youtube.com/embed/' + tmp[2];
jquery.poptrox.js (line 701)

It doesn't seem to effect operation in the jsFiddle (and therefore may not be a problem) but just wondering if it could possibly cause issues in a more complicated scenario as I am troubleshooting an issue in such a scenario (link not available) and trying to narrow down the cause.

Add a counter

Just a suggestion for a feature. It would be cool to have a slide counter so the user knows how many more slide there are. 1 of 10 or 1/10 etc etc. I guess I can just put it in manually in a caption for now.

Auto-hide caption

Is ther a way to not display caption whenever there is no caption on a picture, but display it when caption exists ?

Background scrolling

There should be a setting for turning off scrolling on the page when the popup is open

skel-layers & jquery.poptrox not working.

Hi guys,

When working with skel-layers & jquery.poptrox together there seams to be some issues, I just can't find the right way for them to play nicely.

It seams that when skel-layers is in use it pushes the poptrox lightbox to the bottom, If I remove skel-layers it start working the way it should, must be some kind of conflict.

Any hints? Thanks

No recycling of poptrox-popup and the overlay on ajax jquery website

It seams the poptrox-popup and overlay divs are not recycled. I implemented a tab control with jquery on my website, and when switching to other tab items, which calls multiple poptrox galleries, there are always newly divs created under the body and html tag, and the dom becomes larger and larger.

Is there a way to recycle the existing poptrox-popup and overlay divs? Or do I have to remove the remaining divs in the dom manually after switching to another tab on my page?

Feature Request: support for history pushState and popState

I don't see any recent development happening on github but I've been experimenting with a 2.5.2-dev version of this plugin that came with the materialize theme.

Any chance you could add a setting for onPopupSwitch and expose $x.attr('src') in the context of onPopupSwitch and onPopupOpen so that one could easily use history.pushState?

Related issue: in Firefox, when binding to the onClick event with pushState, of a link that triggers an iframe poptrox-popup, I was left with a blank iframe modal. Same result unexpectedly occurs in Firefox when triggering the click event of a link on popstate. Seems to work without a hitch in Chrome and Opera though.

Feature Request

I have an img and a nested icon which is showed on top of that image.
The small icon is just an indicator, and also contains a title attribute, which is wrongly picked when the poptrox popup is showed.

Would it be possible, to extend the settings with a captionTextSelector to choose the right title of the image, similar to the "selector" setting which can be overwritten: a:has(img[poptrox])

Line 601: i = a.find('img') -> in my case a.find('img[poptrox]')
Line 606: captionText: i.attr('title'),
Here we should be able to apply a custom selector on the a tag, so the correct title is chosen.

That would be great and solve my problem.

Thanks

Sef

Caption option

Hello,

I am not sure how the caption option should work.
Can I use the alt text inside the <img> tag?
Like: <img src="images/1_thumb.jpg" alt="Alt Text" title="Just an image (#1)" />

Thanks,

Vimeo video not working on iPhone

I am using PopTrox on this site:
http://boudoir.jirina.fi/
(scroll down to PORTFOLIO and down to last two thumbs)
video is not working on iPhone5 iOS8.3 with Safari. It does work on iPhone with Chorme tho, but "crashes" when turning the phone ... check this video
https://youtu.be/bpywWuyhJt4

I copied the PopTrox Vimeo code from here
https://github.com/n33/jquery.poptrox
and used it like this
< a href="https://vimeo.com/121874333" data-poptrox="vimeo,800x480" class="image fit from-left">Jirina Alanko Boudoir

but i dont think there's anything in that cause the video works on iPhone with Chrome.

Sorry for newbie question but I now noticed i have the v2.3.2 version ... and the newest is 2.5.1? Should i download that...?

Touch navigation (mobiles)

Is there any chance to make this gallery swipe-active? It looks nice on mobiles but finger-swiping doesn't work. Please point me how to implement this.

Thanks a lot.

increase image dimensions if image is smaller than browser window

Dear ajlkn,

thanks to your great lightboy galley plugin my website shines in a new light.

Today I want to ask about your support or a guide in the "right direction":

I understand that the gallery plugin decreases the image dimensions (width, height) if the image is larger than the browser window when viewed.

Is it possible to increase the image dimensions if the image is smaller than the browser window when viewed?

I'm using some images with the dimensions of 320x240, 640x480 but it's very complicated to read the captions and to navigate between the images using the arrow buttons.

My idea is to use your gallery plugin to enlarge these images to the same specific image dimensions used when decrease a larger image.

Thanks for your help.

Best regards

Fullscreen button for lightbox

Hi,
I'm new to pretty much everything js and am using poptrox for a website I'm making.

I'm trying to display video through an iframe lightbox. I have the video implemented and working fine, however I can't get the fullscreen button to display.

I'm thinking possibly because I have it inside another div?

Here's my html for the video:

`

                 		<a href="video/vid1.mp4" data-poptrox="iframe,1920x1080" frameborder="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen"  
                                msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen">
                               
                            <img src="images/watch.png" width="50%"  title="heading" alt="watch video" />
                            </a>
                               
  </div>`

Thanks a mil!

Soundcloud playlist

Hi, I'm having trouble making the Soundcloud playlist embed working as it's only showing the player and not the available tracks down below. Is there a way of using poptrox with the playlists opposite to tracks? Thanks.

Current code:
<a href="https%3A//api.soundcloud.com/playlists/xxxxxxxx" class="button fit" data-poptrox="soundcloud,800x400">Watch</a>

Poptrox and jScrollPane

I'm having a little issue using jScrollPane (http://jscrollpane.kelvinluck.com/) with Poptrox.
I'm having a gallery inside a div that is vertically scrollable with jScrollPane, and everything is fine except that images rendered below visible area of the scrollable div aren't "poped-up" on click, although they can be previewed if I start the gallery from the iimages that are initially rendered (rendered on page load).
Is this Poptrox relaed or might be something with jScrollPane?
pop1
pop2

vimeo url

This doesn't look actively maintained buy here's a bug anyway:
Vimeo urls are badly parsed due to a faulty regex. This results in iframe urls looking like src="//player.vimeo.com/video/video/123456789" (note the double video).

Two galleries on same page?

Hello,
I'm new with poptrox, but I experiencing a problem when having two "gallery" classes in the same page. The popup closes but leaves a "working" image...
Its not possibel to have two galleries in the same page?
Thank you

next & prev navigation

In your full documentation i haven't found how to make a image gallery which will allow user to navigate to next and prev images.Otherwise proptext is just awesome and highly customizable plugin ever in this field.

Caption problem?

Hi,

I have a question - is there a possibility to make a caption longer? I need to enter description, some links in image caption and I think it's impossible to do it only in "title" section.

Thanks in advance and sorry for my poor english ;-)

best regards,
filip

Lock prevents from closing

This condition prevents the popup from being closed while its content is loading, it can be quite annoying - in case of long loading or unwanted popup opening; I use to bypass that, is it vital, what for ? Seems to work fine without ...

// line 514
    .on('poptrox_close', function() {
        if (isLocked)
        return true;

When you click again on the image, the lightbox doesn't show the image.

Hello,

the plugin works perfect except for one important thing: first, you click on one image, then close it. When you click again on that image, the image doesn't appear (only the loading image).

Could you tell me where is the problem?

Tested local and online, and with your Demo, on Chrome Browser under W7.

Thanks a lot.

Mauricio

Gallery on top of gallery?

My layout is as follows, I have a index.html which has ajax call as gallery member. That works fine. Ajax calls another html and displays it. But if I want to have another gallery on second html page, it doesn't work. Is there a way to make it work?

Make caption clickable

Hey there,

Could you please make the caption clickable? For now, if we add a link or social media button to the caption, the onClick event closes the modal.

$('#four').poptrox({
    caption: function ($a) {
        return $a.attr('title') + ' &rarr; <a href="' + $a.attr('data-link') + '">View on 500px</a>';
    }
});

Also, if a user decides to copy the caption, he can't. Because selecting the text with the mouse will close the modal.

What do you think @n33 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.