ToolTip is not closing with Select2
<script> $(function() { $(‘[data-toggle=”tooltip”]’).tooltip() }); </script> Try this script. It may help you.
<script> $(function() { $(‘[data-toggle=”tooltip”]’).tooltip() }); </script> Try this script. It may help you.
I didn’t known select2 plugin before. I tried it and can’t found any problems. I suppose that you have problems with the width just because use used too large parameter of width function in $(element).width(260).select2();. The demos: one without Bootstrap and another one with including of Bootstrap 3.0.0 works without problems. The select looks like … Read more
you can try with DOMNodeInserted and look for select or the class you’re assigning them Demo $(‘body’).on(‘DOMNodeInserted’, ‘select’, function () { $(this).select2(); }); Update DOMNodeInserted Deprecated This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update … Read more
Just add ignore: [], in Your form validation function. It will enable hidden field validation.So You will get validation for Select 2 $(“#ContactForm”).validate({ ignore: [], rules: { //Rules }, messages: { //messages } });
using Select 2 DEMO $(“#e1”).select2(); $(“#checkbox”).click(function(){ if($(“#checkbox”).is(‘:checked’) ){ $(“#e1 > option”).prop(“selected”,”selected”);// Select All Options $(“#e1”).trigger(“change”);// Trigger change to select 2 }else{ $(“#e1 > option”).removeAttr(“selected”); $(“#e1”).trigger(“change”);// Trigger change to select 2 } }); $(“#button”).click(function(){ alert($(“#e1″).val()); }); <select multiple id=”e1″ style=”width:300px”> <option value=”AL”>Alabama</option> <option value=”Am”>Amalapuram</option> <option value=”An”>Anakapalli</option> <option value=”Ak”>Akkayapalem</option> <option value=”WY”>Wyoming</option> </select> <input type=”checkbox” id=”checkbox” >Select All … Read more
This works for me: $remote.select2(‘data’, {id: null, text: null}) It also works with jQuery validate when you clear it that way. — edit 2013-04-09 At the time of writing this response, it was the only way. With recent patches, a proper and better way is now available. $remote.select2(‘data’, null)
Before you clone the row, you need to disable Select2 on the select element by calling its destroy method: destroy Reverts changes to DOM done by Select2. Any selection done via Select2 will be preserved. See http://ivaynberg.github.io/select2/index.html After you clone the row and insert its clone in the DOM, you need to enable select2 on … Read more
Because Select2 lib prevent any click events on popover list you can’t bind events to .info directly. But you can redefine onSelect method and place there any code you want. See example: http://jsfiddle.net/f8q2by55/ Update for multiple selects: http://jsfiddle.net/6jaodjzq/
By default, the validation on a field is only triggered by these events (for a type=”text” field)… onfocusout, when the user leaves a field (validates just the field) onkeyup, when the user is typing within a field (validates just the field) onclick, when the user clicks the submit button (validates the whole form) If you … Read more
Covered in this google group thread The problem was because of the extra div that was being added by the select2. Select2 had added new div with class “select2-container form-select” to wrap the select created. So the next time i loaded the function, the error was being thrown as select2 was being attached to the … Read more