If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Make Lightbox Movable/Draggable

Make Lightbox Movable/Draggable

Started by scott_ease on 12 Aug 2012, 3:37 PM · Views: 2,407

Results 1 to 7 of 7
12 Aug 2012, 3:37 PM
#1
scott_ease avatar

scott_ease

New Zenner

Join Date:
Jun 2012
Posts:
68
Plugin Contributions:
2

Make Lightbox Movable/Draggable

Can any Zen guru make the lightbox (http://www.zen-cart.com/downloads.php?do=file&id=170) movable so that users can read the webpage without closing the lightbox?
my url: http://angelcorp.net/zencartscottou/index.php?main_page=product_info&cPath=8&products_id=49

I found an article talking about draggable lightbox (http://docs.jquery.com/UI/API/1.8/Draggable), but I have no idea how to add those codes into lightbox program.
thanks.

22 Dec 2021, 1:52 AM
#2
scott_ease avatar

scott_ease

New Zenner

Join Date:
Jun 2012
Posts:
68
Plugin Contributions:
2

Re: Make Lightbox Movable/Draggable

Plugin Draggable Modal Image with Zoom can be used to solve the question. The plugin combines: Modal Image, Draggable Element, Image Zoom, and Tabs code. All from w3schools. Demo is available at https://shop.angelcorp.net/index.php?main_page=product_info&cPath=60_63&products_id=99

I combined those codes to solve this question I posted years ago. It may surprise you that I'm not an IT person. I'm a CPA from California. As a result,

  1. I'm not able to provide any technical support. Anybody can step in to improve and/or expand the function of this plugin.
  2. If your major is not computer science, don't be frustrated. You can build beautiful website as long as you devote time and energy. I initially started learning code right here at Zen Cart forum.

Following improvements are warmly welcomed:

  1. Expand the function of this plugin to cover additional images, like I did with https://cn.angelcorp.net/shop/goods.php?id=9. I have difficulty to make it work with Zen Cart.
  2. The Tabs code from w3schools is very lightweight, so I used it on https://angelcorp.net/organic-formula/index.php?main_page=product_info&cPath=47&products_id=87. But on demo page, I had to use Tabbed Products plugin, because I cannot put Customer Reviews under a tab when using Tabs code from w3schools. Additional codes are required but I don't know how.
24 Dec 2021, 11:52 AM
#3
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: Make Lightbox Movable/Draggable

WOW! thanks! certainly going to try this out!

30 Dec 2021, 3:45 PM
#4
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: Make Lightbox Movable/Draggable

Hey Scott, can you please help me a little. 'm facing a green box in the zoomed area and can't find where to change it :D what css sheet ii need to use!
thanks
Eugénie

31 Dec 2021, 6:24 PM
#5
scott_ease avatar

scott_ease

New Zenner

Join Date:
Jun 2012
Posts:
68
Plugin Contributions:
2

Re: Make Lightbox Movable/Draggable

Please go to file: /includes/templates/Your-Template/jscript/jscript_zoom_modal_tab.js
and see Line 59: document.getElementById('myresult').style.border = "1px solid #65AC94";

I think that's what you are looking for.

6 Jan 2022, 7:30 PM
#6
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: Make Lightbox Movable/Draggable

hahahahaha, totaly overlooked it.
can easy say works like a charm! thanks Scott,
Eugenie

scott_ease:

Please go to file: /includes/templates/Your-Template/jscript/jscript_zoom_modal_tab.js
and see Line 59: document.getElementById('myresult').style.border = "1px solid #65AC94";

I think that's what you are looking for.

6 Jan 2022, 8:44 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,904
Plugin Contributions:
23

Re: Make Lightbox Movable/Draggable

Actually, that should be corrected in the stylesheet_zoom_modal_tab.css on line 13 IF you have that file with your template.

To find your changes during the next upgrade, you can create includes/templates/YOUR_TEMPLATE/css/stylesheet_zcustom.css and add```
.modal {
width: 475px;
height: 529px;
background-color: #fff;
border: 10px solid #65AC94;
}
.modal-content {
border-bottom: 8px solid #65AC94;
}


The .modal background controls both the upper- and lower-portions of the pop-up.  .modal-content controls the bottom of the image NOT the whole pop-up.  Interesting usage.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com