kthornbloom / Smoothproducts

A simple, lightweight and responsive product image viewer using jQuery
kthornbloom.com/smoothproducts
185 stars 89 forks source link

Lightbox feature not compatible with Jquery Mobile #19

Closed fatfantasma closed 8 years ago

fatfantasma commented 8 years ago

Hey, I thought I would start a new thread on this issue.

The lightbox feature is not working with jquery mobile. When you click on the large image nothing happens. However, if I then back out of my page the lightbox shows the image for a couple of seconds then disappears.

I believe it has something to do with how you append the lightbox to 'body'

$('body').append('

');

jquery mobile does several html enhancements that is incompatible in how your plugin operations.

fatfantasma commented 8 years ago

Hey Kevin,

I was able to resolve the issue by increasing the z-index to 1000 by overriding the .sp-lightbox class. Once that was done it worked great in the jquery mobile framework.

.sp-lightbox { z-index: 1000 !important; }

kthornbloom commented 8 years ago

Glad you got it sorted out! I've had to increase the z-index on some of my projects as well. Maybe i'll just update that in the plugin.