bootstrap-select

How to enable/disable bootstrap selectpicker by ickeck checkbox

我们两清 提交于 2019-12-03 22:21:03
There are selectpicker beside checkbox . I want if checkbox is checked, selectpicker will be enable, if unchecked, selectpicker will be disable. I wrote this which was not working ( Here is the fiddle ): $('.checkBox').on('ifChecked', function(event) { $(this).parents('.clearfix').find('.selectpicker').removeAttr('disabled'); }); $('.checkBox').on('ifUnchecked', function(event) { $(this).parents('.clearfix').find('.selectpicker').attr('disabled'); }); You should refresh the selectpicker once the change is done here is a working fiddle Code to refresh the UI is $('.selectpicker').selectpicker(

Bootstrap Select - reinitialize on dynamically added element

与世无争的帅哥 提交于 2019-12-03 04:39:00
I'm using Bootstrap Select ( http://silviomoreto.github.io/bootstrap-select/ ) for displaying dropdown with Font-Awesome icons for each section of my website. I added ability to add new sections - when clicked on add button, a new section (duplicate of previous section) is added. In this section, the Bootstrap Select doesn't work. I tried to reinitilize it like: var select = $('[name="section['+ numbersection +'][section_icon]"]'); $(select).selectpicker('destroy'); $(select).selectpicker({ showIcon: false }); That doesn't work though, as the detroy method doesn't seem to fire. Is there a way

bootstrap-select dropdown options not getting loaded sometime

笑着哭i 提交于 2019-12-01 14:02:33
I'm using bootstrap-select 1.12.4 version with Angular 4.3.5. I'm trying to load the dropdown options using http call and async pipe. The issue I'm facing is, The select dropdown options are not getting loaded most of the time with I refresh the page. But sometimes the options load. I'm not sure what mistake I'm doing here. Can anyone help me here? Thanks in advance. component.ts import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; @Component({ selector: 'app-bob-report', templateUrl: './bob-report.component

input-group-addon with bootstrap-select

六眼飞鱼酱① 提交于 2019-11-30 17:00:44
I tried to use Label 2 with bootstrap-select , but it looks different to the bootstrap ( Label 1 ) one. How is it possible to get the two labels in the code below look the same? <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="../../docs-assets/ico/favicon.png"> <title>Test</title> <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" > <link rel="stylesheet" type="text

input-group-addon with bootstrap-select

ぐ巨炮叔叔 提交于 2019-11-30 16:24:56
问题 I tried to use Label 2 with bootstrap-select , but it looks different to the bootstrap ( Label 1 ) one. How is it possible to get the two labels in the code below look the same? <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="../../docs-assets/ico/favicon.png"> <title>Test</title> <link rel="stylesheet" type="text/css" href="

Bootstrap-select on click get clicked value

心已入冬 提交于 2019-11-30 13:03:59
I am using a jQuery plug-in: bootstrap-select.js my HTML is select(multiple) -> option. I would like to get the currently clicked on option value when a user selects or deselects the option. Example : User selects Item 4 = console.log item 4. Then the user also selects Item 2 = console.log item 2. Currently i'm getting item 4, item 2... they are always in a array and not individual. My end goal is to show and hide divs on the page depending on what the user has selected. There will be multiple select option fields. HTML code: <fieldset class="dreamT"> <select name="team" id="team" multiple

Bootstrap-select on click get clicked value

风流意气都作罢 提交于 2019-11-29 19:09:35
问题 I am using a jQuery plug-in: bootstrap-select.js my HTML is select(multiple) -> option. I would like to get the currently clicked on option value when a user selects or deselects the option. Example : User selects Item 4 = console.log item 4. Then the user also selects Item 2 = console.log item 2. Currently i'm getting item 4, item 2... they are always in a array and not individual. My end goal is to show and hide divs on the page depending on what the user has selected. There will be

Bootstrap Select drop list moves down ward automatically

ⅰ亾dé卋堺 提交于 2019-11-29 02:54:09
问题 I am Bootstrap Select user in IE11. When I fill data with ajax and open it then it automatically move down wards and when I select any value then it's not selected. How can I remove this error? jQuery.ajax({ url: base_url + "UserBusinesses/ajaxState/" + countryId, dataType: 'json', beforeSend: function () { $('#UserBusinessStateId').html('<option value="">Loding... </option>'); $('#UserBusinessStateId').selectpicker('refresh'); $('#UserBusinessCityId').html('<option value="">Select city<

How to reset value of Bootstrap-select after button click

限于喜欢 提交于 2019-11-28 22:52:15
I am using Bootstrap-select plugin ( https://silviomoreto.github.io/bootstrap-select/ ) for my dropdown select box. After I click a button, I want the box to refresh and the "selected" option to reset. This is the dropdown <select id="dataPicker" class="selectpicker form-control"> <option value="default" selected="selected">Default</option> <option value="one">One</option> <option value="two">Two</option> <option value="three">Three</option> </select> And this is my attempt at it, does not work. Any ideas on how it should be? $("#dataPicker option:selected").val('default'); $("#dataPicker")

Bootstrap-select - how to fire event on change

╄→гoц情女王★ 提交于 2019-11-28 06:09:24
I'm using Bootstrap 3.0.2 and the Bootstrap-select plugin. Here's my select list : <select class="selectpicker" data-live-search="true" data-size="7"> <option>Petr Karel</option> <option>Honza Novák</option> <option>David Egydy</option> <option>Sláva Kovář</option> <option>Hana Skalická</option> <option>Simona Kolářová</option> <option>Kateřina Sychová</option> <option>Amálka Sychová</option> <option>Jana Sychová</option> <option>Magdaléna Sychová</option> <option>Tereza Sychová</option> <option>Bohdana Sychová</option> </select> Here's my JavaScript : //inicialization of select picker $('