Hi,
I was looking for an answer for some time, but could not find it... so...
I have a general question on how to check which breakpoint is used using javascript?
I need this to update a table that has different name for different breakpoints.
...or, is there a way to check whether a table is visible or is on - on given breakpoint?
Thanks in advance for your help and time.
How to check which breakpoint is used from javascript
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
-
-
- Posts: 30
- Joined: Sat Feb 26, 2022 3:46 pm
-
-
- Posts: 30
- Joined: Sat Feb 26, 2022 3:46 pm
Re: How to check which breakpoint is used from javascript
I am not sure whether this will work precisely, but I have used $(document).width() to detect the document resolution...
then set a variable pointing to the table and do the things on the table...
if ($(document).width() < 1400) {
var tblProdukty = $("#tblProdukty1280");
} else {
var tblProdukty = $("#tblProdukty1920");
}
tblProdukty.find("tbody").empty();
tblProdukty.find("tbody").append ('....') //etc... do the job.
Hope this will help
then set a variable pointing to the table and do the things on the table...
if ($(document).width() < 1400) {
var tblProdukty = $("#tblProdukty1280");
} else {
var tblProdukty = $("#tblProdukty1920");
}
tblProdukty.find("tbody").empty();
tblProdukty.find("tbody").append ('....') //etc... do the job.
Hope this will help

Re: How to check which breakpoint is used from javascript
I think this is correct.