%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1763756981" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"button"
  format="
    Homepage: $homepage <br />
    Author(s): $author <br />
    Version: $version
  "
}%

%STARTSECTION{"summary"}%
This is a simple way to render nice buttons in Foswiki.
It can be used to replace submit and reset buttons of html forms as well.
FamFamFamContrib is recommended to display nice icons
on buttons. Note, that this widget does not participate on the jquery
theme roller. This is independent.
%ENDSECTION{"summary"}%

---++ Macros

%INCLUDE{"VarBUTTON"}%

---++ Examples

%BUTTON{"%MAKETEXT{"OK"}%" icon="fa-check" onclick="alert(jQuery(this).text());"}%
%BUTTON{"%MAKETEXT{"Cancel"}%" icon="fa-times" onclick="alert(jQuery(this).text());"}%
%BUTTON{"%MAKETEXT{"Info"}%" icon="fa-info-circle" onclick="alert(jQuery(this).text());"}%
%BUTTON{"%MAKETEXT{"Add"}%" icon="fa-plus" onclick="alert(jQuery(this).text());"}%
%BUTTON{"%MAKETEXT{"Delete"}%" icon="fa-minus" onclick="alert(jQuery(this).text());"}%
%BUTTON{"%MAKETEXT{"Globe"}%" icon="fa-globe" onclick="alert('foo')"}%

<div class="jqButtonSet">
%BUTTON{"Android" icon="fa-android"}%
%BUTTON{"Apple" icon="fa-apple"}%
%BUTTON{"Windows" icon="fa-windows"}%
</div>

%BUTTON{"%TRANSLATE{"Upload a Document"}%" icon="fa-cloud-upload" for="file"}%
<input type="file" name="file" id="file" class="foswikiHidden" />
