HTML is:
<div class="form-item" id="edit-image-upload-wrapper"><img id="img_prev" src="#">
<label for="edit-image-upload">Upload Your Picture: <span class="form-required" title="This field is required.">*</span></label>
<input type="file" name="files[image_upload]" class="form-file required" id="edit-image-upload" size="60"></input>
<div class="description"><p>You need to provide a passport sized image in jpg/jpeg or png format. The image size has to be 100kb or lower.</p>
</div>
</div>
JS code:
$('#edit-image-upload-wrapper input').prepend('onchange="readURL(this);"');
due to this JS code input tag has been changed as follows:
<input type="file" name="files[image_upload]" class="form-file required" id="edit-image-upload" size="60">onchange="readURL(this);"</input>
I want to change as follows:
<input type="file" name="files[image_upload]" class="form-file required" id="edit-image-upload" size="60" onchange="readURL(this);"></input>
How can I do this?
<input>is a singular tag, means it has no end tag