简体   繁体   English

jQuery对Bootstrap-Multiselect的动画效果

[英]jQuery animate effects on Bootstrap-Multiselect

I'm trying to add an effect to flash a bootstrap-multiselect dropdown button green when the value is changed. 我正在尝试添加一种效果,以在更改值时使bootstrap-multiselect下拉按钮呈绿色闪烁。 I want to use: 我要使用:

$optionSelect.multiselect({ nonSelectedText: 'Select option', numberDisplayed: 1});
$optionSelect.effect('highlight', {color: 'green'}, 500);

Unfortunately, this causes the multiselect to completely break, splitting up the select and the button. 不幸的是,这导致多选完全中断,从而将选择和按钮分裂了。 The effect then gets applied to the multiselect portion, leaving the dropdown button element unselected. 然后,该效果将应用于多选部分,而未选择下拉按钮元素。 How can I cause the button to highlight without causing the bootstrap-multiselect element to split in two? 如何使按钮突出显示而不会导致bootstrap-multiselect元素一分为二?

I offer using Animate.css to make animation in an event instead of jquery ui 我提供使用Animate.css在事件中制作动画,而不是在jQuery UI中

https://daneden.github.io/animate.css/ https://daneden.github.io/animate.css/

you could download and customize the css file and put the flash class to your elements anytime you want. 您可以随时下载和自定义css文件,并将flash类放入元素中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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