- This topic has 6 replies, 3 voices, and was last updated 10 years, 11 months ago by support-octavio.
-
AuthorPosts
-
FumioUedaParticipantIs it posible to change fontsize using variable?
I want to change font size of textarea for iphone app by using variable.
But, this(1) dose’nt work on MobiOne 2.5 web app. Why?
I am eager to get useful answer.(1) ##########################
var result=12;
$(‘#form1-textArea1’).css(‘font-size’,result);
#############################Whereas this(2) works.
(2) ##########################
$(‘#form1-textArea1’).css(‘font-size’,12);
#############################
support-octavioMemberHi ueda,
I have tried both code you provided on Web Simulator and both worked well. Where are you testing your design? Can you share a sample project that demonstrate the issue?
FumioUedaParticipantHi, Octavio.
Thank you for your quick response.
I understand that variable is not the issue to change font size in this case.I attached sample program including same to the issue.
Would you please checking it.Thank you in advance.
UedaAttachments:
You must be logged in to view attached files.
support-octavioMemberHi ueda,
Thanks for sharing your sample file, it’s a little different than my test file so I couldn’t replicate it. I am not sure what the problem is, but I have escalated the issue to the dev team for advice.
support-vadimParticipantHi ueda,
“font-size” CSS property requires measurement units specified (expect for “0” value). You need to specify them explicitly. So, the code changes are:
$('#m1-ComboTest-textArea1').css('font-size',result + "px"); $('#m1-ComboTest-textArea2').css('font-size',result + "px");
Regards,
Vadim Ridosh
FumioUedaParticipantHi vadim,
Thank you so much for the information.
I understand that “font-size” CSS property requires measurement units.It was exactly what I needed and enabled me to add to my app.
I think your information will also help others like me who need a little guidance now and then.Please tell Octavio my thanks.
Thanks again,
Ueda
support-octavioMemberHi ueda,
Thanks for your follow up. Closing thread.
-
AuthorPosts