Code Monkey home page Code Monkey logo

nivo-lightbox-jquery's Introduction

nivo-lightbox-jquery's People

Contributors

adamcupial-codepill avatar cyken-zeraux avatar gilbitron avatar polevaultweb avatar pvnr0082t avatar

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

nivo-lightbox-jquery's Issues

Matching image urls with query params. possible regex tweak?

images with query params will be sent to iframe (default) as they fail the regex.

Old: .(jpeg|jpg|gif|png)$

Will not catch foo.jpg?bar=5

Suggested change: .(jpeg|jpg|gif|png)(?.+)?$

This will catch the above url and serve it as an image popup.

Not working click on dropdown menu

I use an inline view. The box has html elements such as drop-down menu by clicking the drop-down. But does not work click on the drop-down menu.

Vimeo UI customisation?

Because Nivo is using iframe internally how would I give the option of a fullscreen button and remove the channel branding from the top left? Normally you'd just put those options on the actual .html page but in this case I obviously can't.

Using JQuery plugin in the WordPress functions file

Hey

I have this article under development:
http://easywebdesigntutorials.com/adding-a-lightbox-to-wordpress-without-using-a-plugin/

I have the following code added to the child theme functions.php file.

/\* Enqueue Nivo - http://dev7studios.com/ - works ok - no semi transparent background color, does not show original image size */ add_action( 'wp_enqueue_scripts', 'enqueue_nivoLightbox' ); function enqueue_nivoLightbox() {
wp_enqueue_style( 'nivoLightbox-css', get_bloginfo( 'stylesheet_directory' ) . '/nivo/nivo-lightbox.css', array(), CHILD_THEME_VERSION );

wp_enqueue_script( 'nivoLightbox', get_bloginfo( 'stylesheet_directory' ) . '/nivo/nivo-lightbox.js', array( 'jquery' ), '1.5.13' );

wp_enqueue_script( 'nivoLightbox-init',  get_stylesheet_directory_uri() . '/nivo/nivoLightbox-init.js', array( 'nivoLightbox' ), '1.0.0', true );

}

I have a difficult time having a semi transparent overlay that hides the background page and focuses on the open lightbox image.
It would also be nice to show the default image size that does not resize to the view port.

I also have this nivoLightbox.init code:

jQuery(function( $ ){ $("a[href$='.jpg'],a[href$='.png'],a[href$='.gif']").nivoLightbox(); $('a.gallery').nivoLightbox(); });

It would be nice to also add the gallery code as well as knowing more about the various customizations and variations of them. More then what is listed on your web page.

I would like to add an improved way of using Nivo lightbox to the article that I am writing for all those who want the non plugin way of using Nivo in WordPress.

Have a great day!

ps
Perhaps I should have posted this in the WordPress plugin section, but since I am using the JQuery way I am thinking here is the right place to post. Also it would be interesting to adding your slider in a similar way to how I add the lightbox (if possible).

Work with dynamic content

I work with a lot of images that are fetched/added via ajax and just calling the lightbox on page-load for a given class doesn't work with these.
This should be able to work by changing the initialisation code to $(document).on('click', selector, function).

Close image sizing issue w/ default theme if using bootstrap.

If using bootstrap, a global box-sizing attribute causes a small issue with the close img button, using the default theme.
screen shot 2014-09-03 at 10 55 29 am
I fixed this by adding

.nivo-lightbox-theme-default * {
    -webkit-box-sizing: initial !important;
    -moz-box-sizing: initial !important;
    box-sizing: initial !important;
 }

to the default.css. I've submitted a pull request for the change.

RTL Language Support

Hi,

I am currently adding RTL support on a site for an arabic client

The slider navigation (previous, close, next) text shows when either of the following are used, or both together:

HTML: <html dir="rtl">

CSS: direction:rtl;

Cheers

Chrome: Overlay background doesn't fill the full screen

When an item is opened in the Lightbox, the screen is filled using this class:

.nivo-lightbox-theme-default.nivo-lightbox-overlay

This works fine in all browsers. If you scroll up and down the page, the overlay covers the entire screen.

The issue lies with YouTube videos and that kind of thing (Vimeo too and some custom stuff I've been throwing at it) and only on Chrome.

Scrolling up and down the page reveals that the overlay doesn't cover the entire screen.

image

Hopefully the image explains that better.

I haven't had the time to test this on Windows yet, but on Mac it only appears to be an issue on Chrome. Safari and Firefox work as expected.

I can reproduce this in the NivoLightbox demo.

issue when closing iFrame lightbox

When closing an iFrame lightbox by clicking outside of the lightbox, clicking and right clicking on the web page becomes disabled. I suspect the overlay is not quite being removed properly. Closing an iFrame lightbox with the close button does not cause the issue.

hypen in YouTube video identifier breaks

If a YouTube video's identifier includes a hyphen (many of min do), the identifier is cut off after the hypen
i.e. QWERT-YUIOP becomes QWERT

line 153 of nvio-lightbox.js is:

else if(video = href.match(/(youtube|youtu|vimeo).(com|be)/(watch?v=(\w+)|(\w+))/)){

replacing the regular expressions \w+ with [\w-]+ solves the issue for me.

else if(video = href.match(/(youtube|youtu|vimeo).(com|be)/(watch?v=([\w-]+)|([\w-]+))/)){

Scrolling issue on mobile devices!

I am using Nivo Lightbox on my client's website site. Unfortunately it is not working correctly on mobile browsers, a scrolling problem occurs. On mobile you'll see that while trying to scroll down foreground content, background is being scrolled instead of the lightbox content. It works fine on PCs.

Can you help?

Thanks,
Eva

YouTube HTTPS issue

I thought I'd mention a minor glitch I found in your javascript. I bought a site with your js in it, which lead me here.

nivo-lightbox.min.js

You had:

... if(o[1]=="youtu"){a="http://www.youtube.com/embed ...

this section of code converts the short link into an embed link. While this works, it has a minor issue of ONLY working on http sites, as the protocall is hard coded.

Changing it to:

if(o[1]=="youtu"){a="https://www.youtube.com/embed

allows it to work on both http and https sites, as https content loads correctly over http, however the inverse is not true on all browsers.

There are two instances of the issue in your javascript.

Function to open the lightbox

Something like $.nivoLightbox(url, options), or maybe an option to show on initialise. This would make it easier to control manually.

Nivo Lightbox - scrolling issue while in mobile view

I'm struggling with Nivo Lightbox on my personal portfolio site. Unfortunately I can't make it act correctly on mobile browsers, some scrolling problems occurs.

Please check on android browser, mobile chrome etc. http://www.krzysztofbalana.pl and try to open random project. On mobile you'll see that while trying to scroll down foreground content, background is being scrolled instead of project description.

Thanks in advance! Christopher

Doesn't close on click (Here is the fix)

Noticed in your code across all browsers that there is an inconsistency when u attempt to close the popup image (when u click outside the image area). The problem is in your js script...you forgot to include something like this in the area when it destroys the popup:

if (t.target === this || e(t.target).hasClass("nivo-lightbox-content") || e(t.target).hasClass("nivo-lightbox-image") || e(t.target).hasClass("nivo-lightbox-wrap")) {
a.destructLightbox()

Notice the end part of the if statement has e(t.target).hasClass("nivo-lightbox-wrap")
When i used firebug to inspect i notice randomly all the major browsers seem to get confused and makes the wrap higher in the z order and so clicking cant happen..you have to click further away. When you include e(t.target).hasClass("nivo-lightbox-wrap") it now works consistently.

Doesn't work on iOS

The lightbox won't open on iOS devices.
It did well the first days and now, without any reason it doesn't work anymore :/
Even on the official website.

No support for pre-loading images

I could be wrong, but there doesn't seem to be any provisions for preloading images either side of an open image in the Lightbox when viewing the gallery.
This is causing this lightbox to function quite slow when navigating between images in a gallery.

Problem with recognizing images with query string (fix included)

There is a slight problem that makes image preview appear with scrollbars on Chrome. It occurs e.g. on Drupal when you choose to have scaled image displayed instead of the original one.

The problem is that url looks like this "blah.jpg?some-stuff".

Simple fix - change this:

href.match(/\.(jpeg|jpg|gif|png)$/

To this:

href.match(/\.(jpeg|jpg|gif|png)($|\?)/

NivoLightbox and Infinite Scroll

Hi
I want to use the NivoLightbox with Paul Irish Infinite Scroll. After new content is loaded, the lightbox is not working on the new items.
It look like the lightbox does not know that there are new elements and should be initialized again. On this page (-> http://www.infinite-scroll.com/lightbox-compatibility-code/) I found some code for other lightboxes. What do I have to do for the NivoLightbox to work with the inifinite scroll plugin?

Thanks
Regards
Martin

Cant play youtube videos on iOS 7

Today I discovered that Nivo Lightbox didn't open my YouTube videos on iOS7 Safari and Chrome..

I changed line 164 and 168 from:

youtube.com/v/[ID]

To

youtube.com/embed/[ID]

After that it played fine..

Responsive video

The YouTube and Vimeo examples on your demo page are not responsive - the same on my own site in development. Is there a way to fix this please?

Will not trigger when using the Photon feature included in JetPack

Just a quick bug report. It looks like the the lightbox will not trigger if there are parameters on the end of the image file. For example, this image link will open just fine in a lightbox:

http://www.dwellus.com/wp-content/uploads/2014/12/creighton-1.jpg

However, this will not work:

http://i2.wp.com/www.dwellus.com/wp-content/uploads/2014/12/creighton-1.jpg?resize=1200%2C800

I believe the resize parameter is causing the issue since I was able to get an image in a lightbox to open with this url:

'http://i2.wp.com/www.dwellus.com/wp-content/uploads/2014/12/creighton-1.jpg'

Thanks for the great plugin!!

Angular

How to use on angular???? it's working for angular???

External Images from API services not loading

Hi just to let you know the following issue and a possible correction:

When loading external images from services like Instagram and using Nivo Lightbox to display some images with urls not ending in .jpg or .png or etc are not loading correctly in the ligthbox. I've modded the regex to allow for those cases:

Example url from instagram API:
https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12383353_1705428166401484_523509799_n.jpg?ig_cache_key=MTIxODExMjEwNTk0MjMzMjg3Mw%3D%3D.2

in the line:
https://github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.js#L164

if (s.match(/\.(jpeg|jpg|gif|png)$/i)

Used instead:

if (s.match(/\.(jpeg|jpg|gif|png)(?=[?#])|(\.)(?:[\w]+)$/i)

Even with this mod there's some corner cases when images that doesn't have extensions will be left out too.
like: https://socialmediasite.com/img/34jefsedf34

Other lightbox plugins uses an option called type to let the plugin know we are going to load images.
Maybe is a good addition:

$(".fancybox").fancybox({
   "type": "image"
});

See here:
http://stackoverflow.com/a/6582227/1891792
And here
http://stackoverflow.com/a/13986775/1891792
for related info

Zoom Cursor on Hover

Would be cool if there was a built-in option to enable the cursor to be a Magnifying Glass with the Zoom + in it like they have when you hover over an img on Pinterest for example.

Issue with browser's scroll bar when using lightbox!

I use the Nivio Lightbox on my client's website and when you open it on a monitor (browser) smaller than the lightbox space it throws a second vertical scrolling bar on a browser. Do you have any clue as what's causing it? Here is the screenshot.
screenshot

Inline content not removed

My problem occured when trying to "popin" inline content via
nivo-lightbox. My initial content's behaviour was really strange when
being displayed via nivo-lightbox and not without.

Then some investigations showed me that you clone initial content into a
nivo wrapper without removing initial content. Thus if initial content
may be accessed via other parts of code (for example via html ids),
things are getting bad.

Thus replacing this line of code within the inline section:

wrap.append($(href).clone().show()); 

with these two others

wrap.append($(href).clone(true).show()); 
$(href).empty(); 

everything then plays well.

nivo-lightbox.min.js misses a semicolon

nivo-lightbox.js misses a ; at the end. This causes problems if nivo-lightbox.js is automatically combined with other JavaScript files and some other function definitions come after it. Error message could be TypeError: (intermediate value)(...) is not a function for example.

Can you add some class distinction between Inline and Images

When a link is clicked and shows an image it uses the

tag with a class: nivo-lightbox-wrap
However, when a link that is clicked and shows inlined html it uses the same
tag with the same class: nivo-lightbox-wrap.

This is fine but if one wanted to apply some different css settings for inline popups but need access to the main parent holder (the one that has the class: nivo-lightbox-wrap) it makes since the css wont know which is popped up.

Right now i added code in your js file that adds "inlined" as another class on the same

as nivo-lightbox-wrap ... in other words it looks like class="nivo-lightbox-wrap inlined" ... that way my css will apply new changes to the inlined container.

For Inline -- have a class to use on link to close Lightbox

I notice there is no feature to close the inline lightbox besides the "X" at the top right corner. If someone wanted to have a button in the popup then it is impossible since the "X" uses a class that draws the "X" image, etc. Have an indepenent class that the user can use on their own anchors so when clicked it closes the lightbox.

Lightbox - Youtube and Related Vidoes

When referencing a YouTube URL for a movie within Nivo Lightbox, it does not seem to consider the No Related Content Parameter, for example;

http://youtube_url.com/12345abcde?rel=0

It seems that rel=0 is ignored in all cases.

Did anyone else discover this, and is there a resolve?

Inline Content Issue

  • Have setup Nivo Lightbox to show inline content
  • If content height is more it cut off and hides below view port and cannot be view with scroll as content doesn't move
  • Also on resizing browser if content is more than viewport area text cut off

nivo1
nivo2

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.