facebook

changing fontsize using variable : CLOSED

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #344738 Reply

    FumioUeda
    Participant

    Is 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);
    #############################

    #344756 Reply

    Hi 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?

    #344780 Reply

    FumioUeda
    Participant

    Hi, 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.
    Ueda

    Attachments:
    You must be logged in to view attached files.
    #344818 Reply

    Hi 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.

    #344823 Reply

    support-vadim
    Participant

    Hi 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

    #344846 Reply

    FumioUeda
    Participant

    Hi 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

    #344865 Reply

    Hi ueda,

    Thanks for your follow up. Closing thread.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: changing fontsize using variable : CLOSED

You must be logged in to post in the forum log in