- Posts: 48
- Thank you received: 2
Ask the community, share ideas, and connect with other LimeSurvey users!
/****************** User custom JS --------------- Put JS-functions for your template here. If possible use a closure, or add them to the general Template Object "Template" */ // MathJax function loadMathJax() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js'; script.async = true; document.head.appendChild(script); } // MathJax window.MathJax = { tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] }, startup: { ready: function() { console.log('MathJax is ready'); MathJax.startup.defaultReady(); } } }; // MathJax Excute document.addEventListener('DOMContentLoaded', function () { loadMathJax(); }); $(document).on('ready pjax:scriptcomplete', function() { /** * Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute * @see https://learn.jquery.com/using-jquery-core/document-ready/ */ if(localStorage.getItem("lsFontSize") === null) { localStorage.setItem('lsFontSize', 110); } $('body').attr('data-ls-font-size', localStorage.getItem('lsFontSize')); $('.text-size-container button').on('click', function(e) { var lsCurrentFontSize = Number(localStorage.getItem('lsFontSize')); var sizeIncrement = 10; if($(this).hasClass('minus')) { sizeIncrement = -10 } var lsNewFontSize = lsCurrentFontSize+sizeIncrement; localStorage.setItem('lsFontSize', lsNewFontSize); $('body').attr('data-ls-font-size', localStorage.getItem('lsFontSize')); }); });
Please Log in to join the conversation.
Arg !This only happens on iPhones (iOS).
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.