$.ajax({
type: "GET",
url: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
for (var i = 0; i < response.items.length; i++) {
if (response.items[i].name == "Test Basic Plan") {
Color = "topclr";
} else if (response.items[i].name == "Test Starter Plan") {
Color = "topclr1";
}
else if (response.items[i].name == "X-Test Agency Plan") {
Color = "topclr2";
}
html += '
';
html += '
';
html += '
';
html += '
';
html += '
' + response.items[i].name + '';
html += '
' + response.items[i].description + '';
html += '
' + response.items[i].currency.toUpperCase() + ' ' + response.items[i].unitAmount + '/' + response.items[i].interval + '
'; html += '
'; html += '
- ';
html += '';
html += ' ';
html += '';
I have call this api show me 4 record with 4 button .But i have face a issue how to click button bcz different-2 plan all button.How to click this button
I have try this but not working
$(document).ready(function () {
$("#btn-choosePlan").click(function () {
console.log('Test');
});
});
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Apr 1, 2021, 4:35 PM
Suraj DubeyPosted Apr 1, 2021, 12:21 PM