سؤال

I have dymanically changed interface with orientation change. I calculate my <div> size throu $(window).height(), but it calculating not after page is fully loaded, but before it. How can I do it in Jquery mobile?

هل كانت مفيدة؟

المحلول

You should use resize()

For example :

$(window).resize(function() {
  console.log($(window).height());
});
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top