11.
What does the following jQuery code do: $('a[href*="#"]').on('click', function(event) { event.preventDefault(); $('html, body').animate({ scrollTop: $($.attr(this, 'href')).offset().top }, 500); });
12.
Why is it important to handle viewport orientation changes in responsive design?
13.
Which jQuery event is triggered when the window is resized?
14.
How can jQuery enhance navigation menus in responsive design?
15.
What does the following jQuery code achieve: $('img').each(function() { var src = $(this).attr('src'); if($(window).width() < 768) { $(this).attr('src', src.replace('large', 'small')); } });
16.
How can jQuery be used to make forms more responsive?
17.
What is the benefit of using jQuery for smooth scrolling in responsive design?
18.
Why should images be optimized for different devices in responsive web design?
19.
How can jQuery be used to handle touch events on mobile devices?
20.
What does the following jQuery code do: $('.carousel').on('swipeleft', function() { $(this).carousel('next'); });