How to check which breakpoint is used from javascript

All WYSIWYG Web Builder support issues that are not covered in the forums below.
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
Post Reply
bzc0fq@gmail.com
 
 
Posts: 30
Joined: Sat Feb 26, 2022 3:46 pm

How to check which breakpoint is used from javascript

Post by bzc0fq@gmail.com »

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.
bzc0fq@gmail.com
 
 
Posts: 30
Joined: Sat Feb 26, 2022 3:46 pm

Re: How to check which breakpoint is used from javascript

Post by bzc0fq@gmail.com »

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 :)
User avatar
Pablo
 
Posts: 23598
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: How to check which breakpoint is used from javascript

Post by Pablo »

I think this is correct.
Post Reply