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.
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
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
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.
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.
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.
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.
Who is online
Users browsing this forum: No registered users and 7 guests