{style} .owm_join_photo_upload .owm_upload_photo_attach_wrap { padding:0px; } .owm_join_photo_button { position: absolute; top: 9px; left: 10px; } .owm_join_photo_button_label { padding-left: 63px; margin-right: 8px; min-width:53px; float:left; } .owm_join_photo_button_img { min-width: 100px; float: left; } {/style} {script} $("input[name=userPhoto]").change(function() { var img = $('.join_photo_upload #photo-file-prevew'); var img_span = img.parents(".join_photo_upload .owm_upload_img_name_label"); var changeLabel = $('.join_photo_upload .owm_upload_replace_label'); var uploadLabel = $('.join_photo_upload .owm_upload_choose_label'); var icon = $('.join_photo_upload .join_photo_button a'); var name = img_span.find("span"); name.text(""); img_span.hide(); if (!this.files || !this.files[0]) { return }; if ( window.FileReader ) { var reader = new FileReader(); reader.onload = function (e) { img.attr('src', e.target.result); img_span.css('display','table'); changeLabel.css('display','table'); uploadLabel.hide(); icon.parents('div:eq(0)').addClass('owm_upload_photo_attach_wrap'); } reader.readAsDataURL(this.files[0]); } else { name.text(this.files[0].name); } }); {/script}