javascript - Change selectedColor dynamically in jqvamp -
i using jqvamp plugin , change selectedcolor property dynamically (by clicking on button ) can't figure out how.
var your_variable = ""; // solution 1 // click $('#your_button').click(function(){ your_variable= target_color; // run initialization again test(); }); function test(){ set = $('#map').vectormap({ //...code selectedcolor: your_variable //...code }); } // solution 2 $('#your_button').click(function(){ $('#map').vectormap("set", "selectedcolor", your_variable); }); hope works
Comments
Post a Comment