Result 画像をクリックすると別の任意の画像を選択出来るようになります。 jQuery(function($) { $.fn.imgEdit = function(options) { // デフォルト var settings = $.extend({ inputName : "profile-picture", form : "#profile", }, options); $(this).click(function(e){ var target = this; // input要素作成 input = document.createElement('input'); // Add attributes input.setAttribute('type', 'file'); input.setAttribute('name', settings.inputName); input
![表示されている画像を任意の画像に変更する](https://cdn-ak-scissors.b.st-hatena.com/image/square/b6b1c87ada2ad66409793e3653c810e333009609/height=288;version=1;width=512/http%3A%2F%2Fkachibito.net%2Fwp-content%2Fuploads%2F2019%2F12%2Fsite-icon.png)