onload прокрутка html страницы до нижнего края в iframe в окне jquery
Попробовал разные варианты — не крутится :( Нужно чтобы при открытии jquery popup-окна во встроенном iframe страница по умолчанию отображалась «с конца».
index.html <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('a.button3[href^=#]').click(function() { var popID = $(this).attr('rel'); var popURL = $(this).attr('href'); var query= popURL.split('?'); var dim= query[1].split('&'); var popWidth = dim[0].split('=')[1]; $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"><img src="films/films.png" class="btn_close" alt="Close" /></a>'); var popMargTop = ($('#' + popID).height() + 54) / 2; var popMargLeft = ($('#' + popID).width() + 30) / 2; $('#' + popID).css({ 'margin-top' : -popMargTop, 'margin-left' : -popMargLeft }); $('body').append('<div id="fade"></div>'); $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); return false; }); $('a.close, #fade').live('click', function() { $('#fade , .popup_block').fadeOut(function() { $('#fade, a.close').remove(); }); return false;}); }); </script> </head> <body> <a href="#?w=1230" rel="popup_films" title="Фильмы" class="button"><span>Фильмы</span></a> <div id="popup_films" class="popup_block"><iframe width="100%" height="538" margin-top: 0; frameborder="0" src="/films.html"></iframe></div> Во встроенной html — divы. Хотелось бы обойтись без привязки через id (блоки будут добавляться, не хочется id переносить каждый раз или пустые блоки ставить в конце). Решение принимается любое - главное "грамотное". |
Часовой пояс GMT +3, время: 03:47. |