SpreadJS 15
Features / Theme / Custom Themes from ThemeRoller
In This Topic
    Custom Themes from ThemeRoller
    In This Topic

    You can create a custom jQuery theme using the ThemeRoller and then use the theme with SpreadJS.

    You can find the ThemeRoller at jqueryui.com/themeroller.

    Create the custom theme and then add the link to the page after the SpreadJS link. For example:

    <link href=”css/gcspread.sheets.x.xx.xxxxx.x.css” rel=”stylesheet” type=”text/css” />

    <link href="css/black-tie/jquery-ui.css " rel="stylesheet" type="text/css" />

    You may also wish to use a timer to refresh the widget if downloading the theme from a server.

    Using Code

    This example uses a timer.

    Copy Code
    <!DOCTYPE html>
    <html lang="en">
        <meta charset="UTF-8">
        <title>Spread Sample</title>
        <link href="./css/gc.spread.sheets.x.x.x.css" rel="stylesheet"/>
        <link href="https://code.jquery.com/ui/1.12.4/themes/overcast/jquery-ui.css" rel="stylesheet" type="text/css"
    <script src="http://code.jquery.com/jquery-2.1.1.js" type="text/javascript"></script>
        <script src="./scripts/gc.spread.sheets.all.x.x.x.js" type="application/javascript"></script>
            $(function () {
                var spread = new GC.Spread.Sheets.Workbook($("#ss")[0]);
                $("#btn").click(function () {
                    $("link[title='themeRuler']")[0].href = "https://code.jquery.com/ui/1.12.4/themes/sunny/jquery-ui.css";
                            function () {
                                var spread = $("#ss").data("workbook");
                            }, 500);
    <div id="ss" style="width:50%;height:500px;border:solid 1px gray"></div>
    <input type="button" id="btn" value="Change Theme"/>