Sponsored Content
The Lounge What is on Your Mind? JQuery and CSS Flex Code for Responsive WOL Page Post 303021488 by Neo on Friday 10th of August 2018 11:02:39 AM
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.
 

6 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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
Jifty::Plugin::CSSQuery(3pm)				User Contributed Perl Documentation			      Jifty::Plugin::CSSQuery(3pm)

NAME
Jifty::Plugin::CSSQuery - use the cssQuery JavaScript library with Jifty SYNOPSIS
In your etc/config.yml: framework: Plugins: - CSSQuery: {} DESCRIPTION
cssQuery() is a powerful cross-browser JavaScript function that enables querying of a DOM document using CSS selectors. All CSS1 and CSS2 selectors are allowed plus quite a few CSS3 selectors. This is a Jifty plugin that let you use cssQuery javascript library in your Jifty application. cssQuery has been bundle with Jifty for a long time, for Jifty use it internally. Now it's been replaced with jQuery. It's now a plugin for backward compatibility. It is disabled by default, unless your "ConfigFileVersion" is smaller or equal then 2. For more information about cssQuery, see <http://dean.edwards.name/my/cssQuery/>. METHODS
init This initializes the plugin, which simply includes the JavaScript necessary to load cssQuery, and gets rid of the cssQuery-jquery back- compat script. SEE ALSO
<http://jifty.org>, <http://dean.edwards.name/my/cssQuery/> COPYRIGHT AND LICENSE
This plugin is Copyright 2007 Handlino, Inc. It is available for modification and distribution under the same terms as Perl itself. cssQuery is available for use in all personal or commercial projects under both MIT and GPL licenses. This means that you can choose the license that best suits your project and use it accordingly. See <http://jifty.com/> for current information on cssQuery copyrights and licensing. perl v5.14.2 2010-12-08 Jifty::Plugin::CSSQuery(3pm)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy