jQuery('#map').shakemap({ data:'simple.json' }); jQuery('#destroy').click(function(){ jQuery('#map').shakemap('destroy'); return false; });