SHARE
TWEET

Untitled

a guest Jun 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery('#t_photo').on("click", function(){
  2.     var image = wp.media({
  3.         title: "Upload Image for Trade Name",
  4.         multiple: false
  5.     }).open().on("select",function(){
  6.         var uploaded_image = image.state().get("selection").first();
  7.         var getImage = uploaded_image.toJSON().url;
  8.         jQuery("#show-image").html("<img src='"+getImage+"' style='height:50px;width:50px;'/>");
  9.         jQuery("#trade_pic").val(getImage);
  10.     });
  11. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top