Categories
js PHP

Google Maps API drawing polygon with JSTS Librery

One of our clients has asked for a road map feature for their website. basically what he needs is A Road map that lists all places around the route. Now getting distance between two points was very easy the important thing is how to draw a polygon around the route. After a lot of browsing […]

Categories
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(); […]