Hello, I apologize immediately for a stupid question, but for a long time I really can’t give a condition to scroll on the popup window. In general, popup opens, trying to give a condition on the scroll:
$('#popup_blok').scroll(function(){ alert('ok'); });
but does not work, tried this:
$('#popup_block').live('scroll', function(){ alert('ok'); });
also does not work, generally 0 reactions.
popup_block block is loaded from the database via Ajax. The fade block is created when the user clicks and is added to the dom element after the wrapper:
<div id="wrapper"></div> <div id="fade"> <div id="left"></div> <div id="right"></div> <div id="popup_block"> <div id="popup_conteiner"> <!-- Загруженные элементы из БД --> </div> </div> </div>
I tried the sample in different ways: $ ('# popup_block'), $ ('# fade #popup_block'), $ ('# popup_conteiner'), etc. Can I somehow give a condition on the popup window on the scroll?
The thing is, I need to know the height of #popup_conteiner, and assign its height to #left and #right. I tried to assign it immediately in Ajax
success: function(html){ //////////////////// $('#right, #left').height($('#popup_conteiner').outerHeight(true)); });
So it gives not the exact height, but if you close the pop-up window and again open the exact height it gives, but I need the exact height right away. Tried and height () is also not the result.
And now I decided to try to give a condition when scrolling to assign
$('#popup_block').live('scroll', function(){ $('#right, #left').height($('#popup_conteiner').outerHeight(true)); });
but the result is zero.
Give some advice.