Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery('#t_photo').on("click", function(){
- var image = wp.media({
- title: "Upload Image for Trade Name",
- multiple: false
- }).open().on("select",function(){
- var uploaded_image = image.state().get("selection").first();
- var getImage = uploaded_image.toJSON().url;
- jQuery("#show-image").html("<img src='"+getImage+"' style='height:50px;width:50px;'/>");
- jQuery("#trade_pic").val(getImage);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement