I am currently developing a responsive website and facing a challenge. I need to implement a popup for window sizes smaller than 480px, but on desktop screens, the content should be visible without being inside the popup. I want to avoid duplicating the content unnecessarily.
Feel free to check out this fiddle link for reference.
$(document).ready(function() {
$(window).resize();
$("#filterOpen").click(function() {
$("#mobileFilter").dialog("open");
});
});
$(window).resize(function() {
if ($(window).width() > 480) {
$("#mobileFilter").dialog({
autoOpen: false,
dialogClass: "test",
modal: false,
responsive: true
});
} else if ($(window).width() > 481) {
$("#mobileFilter").dialog().remove();
}
});
Thank you in advance for any assistance provided.