diff --git a/public/styleguide/js/styleguide.js b/public/styleguide/js/styleguide.js index 12b3e40..dfd8d25 100644 --- a/public/styleguide/js/styleguide.js +++ b/public/styleguide/js/styleguide.js @@ -210,6 +210,16 @@ updateSizeReading(val,'em','updatePxInput'); }); + // handle the MQ click + $('#sg-mq a').on("click", function(e){ + e.preventDefault(); + var val = $(this).html(); + var type = (val.indexOf("px") != -1) ? "px" : "em"; + val = val.replace(type,""); + var width = (type == "px") ? val*1 : val*$bodySize; + sizeiframe(width,true); + }); + //Resize the viewport //'size' is the target size of the viewport //'animate' is a boolean for switching the CSS animation on or off. 'animate' is true by default, but can be set to false for things like nudging and dragging