mirror of
https://github.com/pattern-lab/patternlab-php.git
synced 2025-01-18 06:38:20 +01:00
handling onclick events for the MQ list
This commit is contained in:
parent
b65e0c123b
commit
4b0af948a9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user