JSFiddle - React, Tailwind, and code Playground

by ruisoftware

HTML

<div>
    <button>all scales up</button>, except images
</div>

<img src="http://www.google.com/intl/en_com/images/srpr/logo3w.png" width="275" height="95" alt="Google" />

JavaScript

$("button").click(function () {
    $("*").each(function (index, value) {
        var $this = $(value);
        
        // if this is not an image
        if (!$this.is("img") && 
            // and if it does not contain child images
            $this.find("img").length == 0) {
            
            // then scale it up
            $this.css({
                '-webkit-transform': 'scale(1.5)',
                '-moz-transform': 'scale(1.5)',
                '-o-transform': 'scale(1.5)',
                '-ms-transform': 'scale(1.5)',
                'transform': 'scale(1.5)'
            });
        }
    });
});