How can I adapt this javascript to target VML objects for Internet Explorer?
问题 The following code targets svg paths drawn by leaflet maps. However, on IE <= 8, leaflet falls back to VML to draw polylines. How can I adapt this code to target both VML and SVG? (function ($) { // Thank you, Pythagoras :) http://abstrusegoose.com/376 function calculateDistance(s, e) { return Math.sqrt( Math.pow(Math.abs(s.x-e.x), 2) + Math.pow(Math.abs(s.y-e.y), 2) ); } // Call on a set of paths nodes that express lines $.fn.animateLines = function (duration) { if (duration == null)