Event for anchor tag click on HTML renderer

Hello everyone,

I am using a HTML renderer in my project, I would like to implement the following feature:

 

Display of <a> tag hyperlink and observe the click event and prevent default action.

 

Using classic jQuery I can achieve the same using the below code block, however I am not sure how to achieve the same in Build Apps:

 

HTML code:

<a href=”javascript&colon;void(0)” class=”aaf” id=”users_id”>add as a friend</a>

jQuery code:

$(‘.aaf’).on(“click”,function(){
  var usersid =  $(this).attr(“id”);
  //post code
})

Scroll to Top