How would I remove jQuery from this code and have pure JavaScript?

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

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.