Saturday, 23 June, 2018 UTC


Summary

When you have to manage a web project, jQuery can be of great help. In this article, we have compiled some jQuery tips and tricks for making and enhancing responsive sites.Detect viewport sizeCSS media-queries allow you to detect the viewport size and apply different CSS style to elements depending on the viewport width.This can also be done in jQuery, and it can be very useful to achieve results you couldn’t using CSS alone. The following example shows how to detect the viewport width, and subsequently add an element to a list.if ($(window).width() < 960) {$( "ul.mylist").append("<li>One more list element</li>"); …