SergioE Posted May 18, 2017 Share Posted May 18, 2017 (edited) Hello, How can I do with a Leo template, which in the computer version (grid view) will default to a view and in mobile (list view) another view different? Thanks Edited May 18, 2017 by SergioE (see edit history) Link to comment Share on other sites More sharing options...
SergioE Posted May 18, 2017 Author Share Posted May 18, 2017 I need to modify this function on global.js? function bindGrid() { var storage = false; if (typeof(getStorageAvailable) !== 'undefined') { storage = getStorageAvailable(); } if (!storage) { return; } var view = $.totalStorage('display'); if (!view && (typeof displayList != 'undefined') && displayList) view = 'list'; gridType = "grid"; if($("#page").data("type") != 'undefined') gridType = $("#page").data("type"); if(view && view != gridType) display(view); else display(gridType); $(document).on('click', '#grid', function(e){ e.preventDefault(); display('grid'); $.totalStorage('display', 'grid'); }); $(document).on('click', '#list', function(e){ e.preventDefault(); display('list'); $.totalStorage('display', 'list'); }); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now