Code: https://jsfiddle.net/5f874L2j/
jQuery(document).ready(function () {
jQuery(".button a").click(function () {
var pxValue = jQuery("#pixel").val();
var vpwidth = jQuery("#vpwidth").val();
var vwValue = parseFloat(pxValue / vpwidth) * 100;
vwValue = vwValue + "vw";
jQuery(".output label").text(vwValue);
jQuery(".output").show();
});
});
Have you had a look at Paul’s detailed post on the subject?
2 Likes
system
Closed
3
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.