jQuery - Execute scripts based on screen size

$(window).resize(function () {
            if ($(this).width() < '500') {
                alert("mobile");
            }
            else {
                alert("desktop");
            }
        });

Comments

Popular posts from this blog

SP People Picker Validation

Create multiple web parts in one SPFx Solution

JQgrid Auto Complete functionality for a textbox using Jquerry