CSS Customize the Color of Toolbar Buttons

  • Last update:December 16, 2020
  • I. Overview

    1.1 Requirement

    How to change toolbar button colors? Use CSS to achieve the effect as shown below:

     


    1.2 Solution

    Add a Loading End event to the template, fetch buttons using  classes  in JavaScript and change font colors using  css() .

    II. Sample 1: Settings for data entry preview

    2.1 Add a Loading End event

    Click [Template]>[Web Attributes] >[Data Entry Settings] to add a Loading End event:

     

    Input the following JavaScript codes:

    $('.fr-btn-text.x-emb-submit').css('color''red'); // Set the color for the Submit button
    $('.fr-btn-text.x-emb-export').css('color''red'); // Set the color for the Export button
    $('.fr-btn-text.x-emb-verify').css('color''red'); // Set the color for the Data Verification button
    $('.fr-btn-text.x-emb-flashprint').css('color''red'); // Set the color for the Print Client button
    $('.fr-btn-text.x-emb-print').css('color''red'); // Change print color
    $('.fr-btn-text.x-emb-email').css('color''red'); // Change email text color
    $('.fr-btn-text.x-emb-appendrow').css('color','red'); //Change the color of Add Record
    $('.fr-btn-text.x-emb-deleterow').css('color''red'); // Set the color for Delete Columns/Rows button

     

    2.2 Preview

    Save the template and click [Data Preview]. The preview effect is shown as below:

      

    III. Sample 2: Settings for Pagination Preview

    3.1 Add a Loading End event

    1) Add a toolbar button if you need, as shown in the figure below:

     

    2) Click [Template]>[Web Attributes] >[Pagination Preview] to add a Loading End event:

     

    Input the following JavaScript codes:

    $('.fr-btn-text.x-emb-previous').css('color','red');//Change the color for Previous button
    $('.fr-btn-text.x-emb-first').css('color','red');//First
    $('.fr-btn-text.x-emb-next').css('color','red');//Next
    $('.fr-btn-text.x-emb-last').css('color','red');//Last
    $('.fr-btn-text.x-emb-excel').css('color','red');//Export as a Excel file
    $('.fr-btn-text.x-emb-export').css('color','red');//Set the color for the Export button
    $('.fr-btn-text.x-emb-print').css('color','red');//Set the color for the Print color
    $('.fr-btn-text.x-emb-email').css('color','red');//Set the color for the Email button
    $('.fr-btn-text.x-emb-flashprint').css('color','red');//Set the color for the Print Client button

     

    3.2 Preview

    Save the template and click [Pagination Preview]. The preview effect is shown as below:

     

    IV. Download the template

    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy