JQuery and CSS Flex Code for Responsive WOL Page


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? JQuery and CSS Flex Code for Responsive WOL Page
# 1  
Old 08-10-2018
JQuery and CSS Flex Code for Responsive WOL Page

I have just wrote this jQuery to the WOL page, so the table of users on line will not need scrollbars and will instead transform into a responsive table:

Code:
<script>
jQuery(document).ready(function (){
    jQuery("#neo-who-flex-tcat").
        css({"display":"flex","flex-flow":"row wrap",
            "justify-content":"space-between",
            "flex-direction":"row","align-content":"stretch"});
    jQuery("#neo-who-flex-thead").
        css({"display":"flex","flex-flow":"row wrap",
            "justify-content":"space-between","flex-direction":"row",
            "align-content":"stretch"});
    jQuery(".neo_table_wrapper").
        css({"overflow":"visible"});
    jQuery(".neo-onlinebit-flex").
        css({"display":"flex","flex-flow":"row wrap",
            "flex-direction":"row","align-content":"stretch",
            "justify-content":"stretch"});
    jQuery(".neo_table_wrapper").find("td").
        removeAttr("width").css({"align-self":"stretch",
        "width":"250","flex-grow": "1"});
});
</script>

You can check it out by going to the Who is Online Page page (members only) and change with width of your browser and when it gets small, instead of the scrollbars, the column boxes cascade down (responsive).

Code:
https://youtu.be/vFJVX4-bsVM



This means I was able to use CSS Flex to make the table responsible without changing all the table, thead, th, and td tags to divs and spans.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. What is on Your Mind?

New Responsive 404 Page for UNIX.com

Just created (actually, only modified... it was created by ShoutOut) a new responsive 404 "not found" page with the help of ShoutOut free templates. https://www.unix.com/status/404.html Same for 401 and 403 errors. Picture sans animation: ... (2 Replies)
Discussion started by: Neo
2 Replies

2. Web Development

PHP Changes to WOL for New Forum Home Page

Wrote some PHP code today to make the Who Is Online (WOL) in the forums work properly with the new home page: Wrote this global plugin to add the location to both the user table (for members) and session table (for guests + registered users) <?php if (THIS_SCRIPT != 'misc' and... (0 Replies)
Discussion started by: Neo
0 Replies

3. Web Development

Turning jQuery Code into Vue.js

The following is some code I am working on the replace our navbar (someday) with a Vue component. Vue.component("unix-navbar", { template: `<div class="neo-table-border vuenavbar"><div class="flex-item" style="margin-bottom:10px;padding-top:13px;"><a class="vuenavbarhome"... (19 Replies)
Discussion started by: Neo
19 Replies

4. What is on Your Mind?

JQuery and CSS Flex Code for Responsive Forum Home Page

So far, I have completed making the home page more responsive (except for the forum stats at the top and the WOL box at the bottom, they still use scroll bars). xevV3_iZ8-s For full screen use the link below and set your YT resolution to 1080p60 HD https://youtu.be/xevV3_iZ8-s Here is... (1 Reply)
Discussion started by: Neo
1 Replies

5. What is on Your Mind?

Man Page Repositories - Added jQuery and Bootstrap

I added both jQuery and Bootstrap Javacript libs to all man page repository pages. TODO: I need to add pagination to these repos because most are very large and load to slow on a single page. For the first upgrade, I manually added one new CSS Class (repository) to the main repo tables and... (0 Replies)
Discussion started by: Neo
0 Replies

6. Shell Programming and Scripting

need to know best forum site for flex code

Hi All, Please help me to know the similar forum site but for the flex code. Thanks (6 Replies)
Discussion started by: aish11
6 Replies
Login or Register to Ask a Question