-1

Is it possible to set an Action Icon to be a button? In my VF SLDS page, I am returning a list of records. For each record, I am showing an icon. I would like when for a specific record, the icon is clicked, to create a new record. What I am trying to figure out is how to set the Icon to be clickable. Here is sample code where I am sowing the Action Icon. The reason I am looking for this to be a button is because I would like to call a method from my controller.

<td>
<span class="slds-icon_container slds-icon-standard-account" title="Create Account"> 
<svg aria-hidden="true" class="slds-icon "> 
<use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/standard-sprite/svg/symbols.svg#account')}"></use>
</svg>
<span class="slds-assistive-text">Create an Account for this record</span>
</span>
</td>
-1
<td>
<button class="slds-button slds-button_icon slds-button_icon-brand" title="Create Account">
<svg class="slds-button__icon slds-icon_small" aria-hidden="true">
<use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/standard-sprite/svg/symbols.svg#account')}"></use>
</svg>
<span class="slds-assistive-text">Create Account</span>
 </button>
</td>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.