I'm struggling to make Math.round(num * 100) / 100
work with normal jQuery. Can someone please help?
The following script successfully converts lengths:
<script>
var meters = document.getElementsByClassName("num");
for (var i = 0; i < meters.length; i++) {
meters[i].innerHTML = parseInt(meters[i].innerHTML) * 3.2808399;
}
</script>
<p class="num">12</p>
<p class="num">7</p>