MATH201/themes/zettels/assets/js/thumbnails.js

13 lines
433 B
JavaScript

// Resize images using an input range.
function resizeImage() {
// make p tags wrapping img tags inline, to resize images correctly
$("#main p").has("img").css("display", "inline-block");
// toggle vectical input range
$("#toolbar input[type=range][orient=vertical]").slideToggle()
// resize image
$("#toolbar input[type=range][orient=vertical]").mouseup(function () {
$("#main p img").css("width", this.value + "%")
});
}