Добавить к ссылкам &pageheight;
есть скрипт на странице
var pageheight = jQuery(window).height(); есть ссылки <area class="iframe" href="/res/gen/floor-plan.php?floor=14&height="> <area class="iframe" href="/res/gen/floor-plan.php?floor=15&height="> .... как мне всем ссылкам добавить после значения height= актуальное число которое храниться в переменной pageheight чтобы получилось вот так если pageheight = 900 <area class="iframe" href="/res/gen/floor-plan.php?floor=15&height=900"> |
Например, так:
var pageheight = jQuery(window).height(); $('.iframe').each(function() { var str = $(this).attr('href').replace('height=', 'height=' + pageheight); $(this).attr('href', str); }); |
спасибо!
|
Часовой пояс GMT +3, время: 23:10. |