Hiren Kukadiya

Display Drag and Drop Div grid View HTML using Div.

When Dislpay div using grid view. Demo : http://ksylvest.github.io/jquery-gridly/ Source  : https://github.com/ksylvest/jquery-gridly How to Get Order of Div: In jquery.gridly.js Gridly.prototype.layout = function() { var $element, $elements, index, j, position, ref, ref1, structure; $elements = (((ref = this.settings.callbacks) != null ? ref.optimize : void 0) || this.optimize)(this.$sorted()); structure = this.structure($elements);...Read more …
Hiren Kukadiya

Display Image after Upload

Set background image on div. <input type=”file”  class=”square_thumb_input” onchange=”readURL(this);” > function readURL(input,id) { if (input.files && input.files[0]) { var reader = new FileReader();       reader.onload = function (e) { $(‘.square_thumb_input’).css(‘background-image’, ‘url(‘ + e.target.result + ‘)’); // $(‘#’+id) user class or id of div which have display image. }; reader.readAsDataURL(input.files[0]);...Read more …