1.

What Is Resize() Function In Jquery?

Answer»

The resize() FUNCTION is called WHENEVER the browser size is changed. This event can be only USED with $(window).

Syntax: .resize([event_data], handler(event_object))

  • The “event_data” is the data to be sent to the handler.
  • The “handler(event_object)” is a function to be called each time when the window is resized.

For EXAMPLE

$(window).resize(function() {
$('#message).text('window is resized to'+$(window).width()+
‘x’ + $(window).height());
});

The resize() function is called whenever the browser size is changed. This event can be only used with $(window).

Syntax: .resize([event_data], handler(event_object))

For example



Discussion

No Comment Found