Initialize jquery-findus
$(function() { $('.findus').findus(); })
In order to update the component, simply call the plugin again with another set of options
<div id="update-findus-example"> <div class="btn-group form-group"> <a class="btn btn-default" data-address="New York">New York</a> <a class="btn btn-default" data-address="Rio de Janeiro">Rio</a> <a class="btn btn-default" data-address="Tokyo">Tokyo</a> </div> <div class="findus" data-address="New York"></div> <script> $('#update-findus-example .btn').on('click', function() { $('#update-findus-example .findus').findus($(this).data()); }); </script> </div>