简体   繁体   中英

How to refresh all select fields on changing to landscape mode with selectBoxIt?

i need help. Was working on it but i couldn't solve the issue!

The documentation says it's possible to rebuild all sleect fields. http://gregfranko.com/jquery.selectBoxIt.js/#MethodAPI

I need a solution to rebuild all select fields on changing to landscape to put the width back to 100% and vise versa. That is what Igot so far!

var selectBox = $("select").selectBoxIt().data("selectBoxIt");

window.onresize = function() {
    $("select").selectBoxIt().refresh();
}

请尝试以下语句:

$('select').data('selectBox-selectBoxIt').refresh();

如果您只是想更改选择正文的CSS宽度,则应使用CSS3媒体查询。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM