Post by stu567blue » Mon Jul 30, 2012 9:52 pm

Hi All,

Hope all is well.

Does anyone know how to go about making the colorbox popup image a responsive popup??

Any help would be great..

Thanks.

New member

Posts

Joined
Tue Jul 03, 2012 4:29 pm


Post by gmedia01 » Thu Apr 11, 2013 2:35 am

I am also looking to know.

If anyone knows or has already answered this in another thread, please share.

I already have a responsive site (although I'm still working on the "wishlist" and "compare" pages). We have @media queries already.

Thanks ahead of time!

Chris

New member

Posts

Joined
Sun Aug 26, 2012 4:49 am

Post by butte » Thu Apr 11, 2013 9:30 am

I actually hesitate to guess exactly what "making the colorbox popup image a responsive popup" means, and what a "responsive site" means, so if you care to explain those, then maybe this year-old thread will be answered.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by john_percy » Thu May 16, 2013 1:34 am

The simplest way is to edit jquery.colorbox.js in catalog/view/javascript/jquery/colorbox and change the default values of maxHeight and maxWidth from false to "100%" (don't forget the quotes in this case).

I found the tip here: http://wordpress.org/support/topic/responsive-colorbox

It does mean that you are editing core files and need to keep a record of what you have done so you can repeat it on your next upgrade but nothing else I tried worked as expected (my fault, I guess).

PS "Responsive" means that the coding adjusts to different size screens. By default colorbox won't work on mobiles. With this mod, it does.

Newbie

Posts

Joined
Wed May 01, 2013 2:09 am

Post by butte » Fri May 17, 2013 12:01 am

Your tip as to making backups and then editing the .js will be generally helpful to those who need it. As the link intimates, there are several places to make changes (a .js file and a header script, but also actually several .js files if one is determined to see how they work together).

Although "popups" can be any size relative to client screens, they're ordinarily somewhat smaller than the screens even if given variable size (percentage). He had originally wanted a "responsive popup" even after he "already [had] a responsive site," while he was "still working on the "wishlist" and "compare" pages," so however he'd done the former (site) did not, apparently reach the latter (pages), and did not, apparently, go to the heart of .js driving colorbox.

That "responsive" means or should mean specifically or only automatic adjustment to client monitor sizes is part of what I hesitated to guess was narrowed in that fashion to that extent. "Responsive" applies to a fairly wide array of contexts of adjusting (in code, by way of code) how rendering suits clients. A few of us, at least, have for many years made (in code, by way of code) screens unfixed and instead of variable width, and for that matter also height, intentionally to suit monitor variations as well as to suit layouts, and for that particular context the thought of "auto-adjusting sizes" or the like applies without restricting the broader meaning of "responsive" itself. Likewise, a few of us, at least, have for many years also provided (in code, by way of code) for rendering screens to suit video card limitations (starting with those limited to 16 or 256 colors or greys), plural browser idiosyncrasies (they've always had idiosyncrasies), client elective choices (personal options), and whatnot. To restrict "responsive" to varying screen size is to say that "responsive means % (percentage), non-responsive means px (pixels), of screen size," and a few of us, at least, rendered and still live in a wider world than that.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 7 guests