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

14 lines
468 B
JavaScript
Raw Permalink Normal View History

2023-12-29 16:17:03 -07:00
// 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
2023-12-29 20:05:27 -07:00
$("#toolbar input[type=range][orient=vertical]").slideToggle();
2023-12-29 16:17:03 -07:00
// resize image
$("#toolbar input[type=range][orient=vertical]").mouseup(function () {
2023-12-29 20:05:27 -07:00
$("#main p img").css("width", this.value + "%");
this.title = this.value + "%";
2023-12-29 16:17:03 -07:00
});
2023-09-27 10:58:42 -06:00
}