kartik-v / yii2-slider

A slider input with orientations, range selections and more features based on bootstrap-slider.
http://demos.krajee.com/slider
Other
28 stars 20 forks source link

Conflict with jquery ui slider #12

Closed execut closed 9 years ago

execut commented 9 years ago

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

kartik-v commented 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.

execut commented 9 years ago

very fast, thank you=)

BenasPaulikas commented 6 years ago

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);

yaroslavolekh commented 6 years ago

i've got the save error: jQuery(...).bootstrapSlider is not a function

brunodotgg commented 5 years ago

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'] ];