jquery-radar

A jQuery plugin providing a radar sweep animation.

View project onGitHub

jQuery-Radar

A jQuery plugin providing a radar sweep animation. Provides the ability to publish X/Y coordinate points for them to appear within the radar sweep animation.

Dependencies

The plugin is dependent upon jQuery and Underscore.

Usage

Include the radar CSS and JavaScript files within your page in addition to the dependency script files:

<link href="radar.css" rel="stylesheet" type="text/css" />
<script src="radar.js"></script>

HTML

A default radar; simply assign the radar CSS class to an HTML element. The default size is 320px width / 320px height.

<div class="radar"></div>

Or... Specify a height/width different from the default.

<div class="radar" style="width: 120px; height: 120px;"></div>

JavaScript

$(function() {
  var radars = $(".radar").radar().each(function() {
    var points =  [
      { X: 33.73834818019053, Y: 17.133526305855796 }, 
      { X: 41.04449004559928, Y: 23.090547816002868 }, 
      { X: 53.450948245470364, Y: 58.23568471317653 }
    ];

    $(this).data("radar").updatePoints(points);    
  });
});

Authors and Contributors

Jason Fuehner (@jfuehner)