adamwulf / Columnizer-jQuery-Plugin

The Columnizer jQuery Plugin will automatically layout your content in newspaper column format. You can specify either column width or a static number of columns. And, of course, it’s easy to use!
http://welcome.totheinter.net/columnizer-jquery-plugin/
Other
760 stars 147 forks source link

function args will not accept variables #141

Closed petertoyota closed 9 years ago

petertoyota commented 10 years ago

I am trying to pass a variable as the width: and height: parameters when calling the function from html. This is a number variable. I am using the current version downloaded about two weeks ago. I made a window.alert breakpoint inside your program and can verify that the variables are being sent to the function as values of type number. These are int numbers, yet the script will not columnize with the parameters as variables.

in other words, THIS WORKS: $(function(){ /var vpx = (window.innerWidth > 0) ? window.innerWidth : screen.width; var vpy = (window.innerHeight > 0) ? window.innerHeight : screen.height;/

                    $('#portrait').columnize({ 
                            width : 380,
                            height : 500,
                            target : '.wide'
            });
         });

But THIS DOES NOT: $(function(){ var vpx = (window.innerWidth > 0) ? window.innerWidth : screen.width; var vpy = (window.innerHeight > 0) ? window.innerHeight : screen.height;

                    $('#portrait').columnize({ 
                            width : vpx,
                            height : vpy,
                            target : '.wide'
            });
         });

if I test by window.alert from inside columnize(), I can see the values of vpx, vpy as numbers.

adamwulf commented 10 years ago

can you post an example of the bug in action on jsfiddle? I don't know of any reason why passing arguments vs raw values would affect it. inside of columnizer it's all the same.