1

Is it possible to refresh a div only while resizing the html page without setting a timer?

Moncader
  • 3,388
  • 3
  • 22
  • 28
aravinda
  • 71
  • 2
  • 16

2 Answers2

0

You can use the window resize event like

$(window).bind('resize', function() {
   $("#mydiv").load(location.href + " #mydiv");
});
Brijesh Bhatt
  • 3,810
  • 3
  • 18
  • 34
0

Use the following module, to perform action on window resize

$( window ).resize(function() {
    // add actions needed
});

Resize


To refresh div

$("#mydiv").load(location.href + " #mydiv");

[source: https://stackoverflow.com/a/26414078/2134604]

Community
  • 1
  • 1
Pandiyan Cool
  • 6,381
  • 8
  • 51
  • 87