I have a div which contains some html content like text and a table, by using jQuery or any other tool I need to make that html content zoom in & out.
I've tried below code, but it is not working in Firefox.
HTML
<input type="button" id="zoomin" value="+" onclick="return ZoomIn();">
<input type="button" id="zoomout" value="-" onclick="return ZoomOut();">
<div class="imgBox" id="imgBox" style="zoom: 100%;">
//My content
</div>
JS
function ZoomIn() {
var ZoomInValue = parseInt(document.getElementById("imgBox").style.zoom) + 10 + '%'
document.getElementById("imgBox").style.zoom = ZoomInValue;
return false;
}
function ZoomOut() {
var ZoomOutValue = parseInt(document.getElementById("imgBox").style.zoom) - 10 + '%'
document.getElementById("imgBox").style.zoom = ZoomOutValue;
return false;
}
The code above is working in Chrome & IE but not in Firefox. What is the fix for this? Thanks.