無限の検索の後、私はこれを理解することを望んでいます。基本的に、ブラウザ ウィンドウのサイズが変更されたときに、スクリプトを取得して再起動する必要があります。私は危険なほどJSについて十分な知識しかありません。
スクリプトは、レスポンシブ テンプレートにある非レスポンシブ スライダーです。現在、ウィンドウが最初に読み込まれる解像度に基づいて、スクリプトは出力を変更し、適切に表示します。ただし、ウィンドウのサイズを変更すると、スクリプトがおかしくなり、見栄えが悪くなります。
スクリプトを書き直してサイズ変更をリッスンし、サイズを再計算できるようにしたいのですが、残念ながら私の知る限り、その作業は圧倒的です。スクリプトを再起動して、同様の結果が得られることを願っています。
これは、スライドショーが呼び出されるときです。
$(document).ready(function()
{
$("#showcase").awShowcase(
{
content_height: 640,
fit_to_parent: true,
auto: false,
interval: 5000,
continuous: true,
loading: true,
tooltip_width: 200,
tooltip_icon_width: 32,
tooltip_icon_height: 32,
tooltip_offsetx: 18,
tooltip_offsety: 0,
arrows: true,
buttons: false,
btn_numbers: true,
keybord_keys: true,
mousetrace: false, /* Trace x and y coordinates for the mouse */
pauseonover: true,
stoponclick: false,
transition: 'hslide', /* hslide/vslide/fade */
transition_speed: 500,
transition_delay: 300,
show_caption: 'show', /* onload/onhover/show */
thumbnails: true,
thumbnails_position: 'outside-last', /* outside-last/outside-first/inside-last/inside-first */
thumbnails_direction: 'horizontal', /* vertical/horizontal */
thumbnails_slidex: 0, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
dynamic_height: true, /* For dynamic height to work in webkit you need to set the width and height of images in the source. Usually works to only set the dimension of the first slide in the showcase. */
speed_change: false, /* Set to true to prevent users from swithing more then one slide at once. */
viewline: true /* If set to true content_width, thumbnails, transition and dynamic_height will be disabled. As for dynamic height you need to set the width and height of images in the source. It's OK with only the width. */
});
});
ウィンドウのサイズ変更を検出し、150 ミリ秒待機するコードも用意していますが、その後、道に迷ってしまいます。
var resizeTimer;
$(window).resize(function() {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
}, 150);
});