Setting button text changes height
I am changing the text on some buttons as the page loads using:
Tiggzi("mButDay1").text("Day 1 - Shoulders");
but it is then reducing the button height.
How can I make it keep the same size?
Thanks
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
I am changing the text on some buttons as the page loads using:
Tiggzi("mButDay1").text("Day 1 - Shoulders");
but it is then reducing the button height.
How can I make it keep the same size?
Thanks
Hi Dan.
Try this
codeTiggzi("mButDay1").find('.ui-btn-text').text("Day 1 - Shoulders");/code
That works great, thanks again
I tried running this in a mapped grid loop in order to target the button component. Each result is supposed to have a different value and the JS below will change the button color if the Value is "Connected"
if(value==="connected"){
$("a[dsid='connected_button2'] .ui-btn-text").css("background-image","linear-gradient(#15e109, #15e109)");
$("a[dsid='connected_button2'] .ui-btn-text").text("View Profile");
}else{
console.log("connection status is"+' '+value);
}
This just seems to change ALL the buttons to the same color and text, not each individually based on the values from the grid loop.
Is there a better way to target for a button in a loop for CSS Changes?
Thanks
Matt
Hello,
You can use this code:
$(element).css("background-image","linear-gradient(#15e109, #15e109)");
It'll allow refer to each button separately from the mapping