One of our clients has asked for a roadmap feature for their website. Basically what he needs is a road map that lists all places around the route. Now getting the distance between two points was effortless. The important thing is how to draw a polygon around the route. After lot of browsing and Googling,… Continue reading Google Maps API drawing polygon with JSTS Library
Category: js
Jquery moving all items in listbox at once
jQuery example of moving single element from one list to another http://jsfiddle.net/RbLVQ/60/ Javascript: $(document).ready(function() { $(‘#btnRight’).click(function(e) { var selectedOpts = $(‘#lstBox1 option:selected’); if (selectedOpts.length == 0) { alert(“Nothing to move.”); e.preventDefault(); } $(‘#lstBox2’).append($(selectedOpts).clone()); $(selectedOpts).remove(); e.preventDefault(); }); $(‘#btnLeft’).click(function(e) { var selectedOpts = $(‘#lstBox2 option:selected’); if (selectedOpts.length == 0) { alert(“Nothing to move.”); e.preventDefault(); } $(‘#lstBox1’).append($(selectedOpts).clone()); $(selectedOpts).remove();… Continue reading Jquery moving all items in listbox at once
