jquery - Ajax loading in a container. Problem with height? -


I'm having a problem, so let me describe your situation:

I have a site 2 main areas A navigation link and where content is shown.

I am using AJAX so that when I complete these steps on a link, click:

1) Content in #fadea

2 ) New content is loaded

3) The height of #main changes

4) New content is shown.

But for some reasons on some pages, the height of # has not been adjusted appropriately, it will be very small, cut down the content. Ive noticed that this is only for the first time that you load the page, so I think the problem of the browser is not able to calculate the height of it properly until all the data is downloaded. But I can not understand why this happens, because the callback function should not start unless everything is loaded?

Anyway, I hope you guys can give me a hand thank you!

  $ ("a: not ('noajax')"). Live ("click", function (e) {e.preventDefault (); // Load new page link = $ (this) .attr ("href"); LoadPage (link);}); Fix Function Load Page (href) {// Main Container var old_height = $ (". Outermain") InnerHeight (); . $ ("# Main") CSS ({"height": (old_height)}); // $ ("Externalmine") Fade Auto (100, Function () {// New Height $ ("External.") Css ({"Display": "Block", "( Load the new page (". Outermain"). Load (href + ".innermain", function () {var new_height = $ ("Outermain"). InnerHeight (); Wear rolloutpid = 700 - (new_height / 30); rolloutpad = 600; $ ("#man"). Ammet ({"height": new_height}, rollout speed, "easy outback", function () {$ (". External mine ") .css (" visibility ":" visible "," display ":" none "}) RemoveClass ("ajaxblocked");})}}}}}}}}   

and this is HTML:

/ P>

  section id = "main"> 

If there are references to images in the requested HTML, then you will not be downloaded before computing the new size, if I'm not mistaken.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -