Closed execut closed 9 years ago
A new boolean property pluginConflict
has been added which defaults to false
.
Set it to true
if you are using with jquery UI and you are done.
very fast, thank you=)
After setting pluginConflict
to true
I get this JS error
jQuery(...).bootstrapSlider is not a function
In source code I see this:
jQuery('#xyz').bootstrapSlider(bootstrapSlider_b6216955);
i've got the save error: jQuery(...).bootstrapSlider is not a function
If you get .bootstrapSlider is not a function you have a problem in loading the dependencies.
Simply:
use kartik\slider\Slider;
Yii::$app->assetManager->bundles['kartik\base\WidgetAsset'] = [
'depends' => ['kartik\slider\SliderAsset']
];
Yii::$app->assetManager->bundles['kartik\slider\SliderAsset'] = [
'depends' => ['yii\jui\JuiAsset']
];
Yii::$app->assetManager->bundles['yii\jui\JuiAsset'] = [
'depends' => ['yii\bootstrap\BootstrapPluginAsset']
];
While attached jquery ui, yii2-slider is not created, widget named slider is already exist. Bootstrap slider is designed for this here: https://github.com/seiyria/bootstrap-slider/blob/master/js/bootstrap-slider.js#L1455 Used other function name bootstrapSlider But JuiAsset must registered before yii2-slider asset