Jquery replaceWith

I got to learn a new jquery code to this time, its “replaceWith”. I think the function is like replacing a component with the component you want. Code : “$(“#replace_me”).replaceWith( ‘<div id=”replace_me”>New Me</div>’ )” HTML : “<div id=”replace_me”>OLD Me</div>” The result going to be “<div id=”replace_me”>New Me</div>” because “OLD Me” div already being replaced with …

Jquery Preview Upload Image

I just got a micro site project, one of the feature is User have to upload a picture and before submitting it, there will be a preview for the picture first. So i browser around to get a glimpse how to do that, and here it is. <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script> <div id=”gallery_upload_container”> <img id=”previewing” src=”https://s.w.org/style/images/wp-header-logo.png”> </div> …