//Do it simple
var data="1,2,3,4";
//Make an array
var dataarray=data.split(",");
// Set the value
$("#multiselectbox").val(dataarray);
// Then refresh
$("#multiselectbox").multiselect("refresh");
More Related Contents:
- How to get the class of a div on click [closed]
- WordPress how to use jquery and $ sign
- What does “async: false” do in jQuery.ajax()?
- Jquery Ajax Posting JSON to webservice
- How to fade to display: inline-block
- Get the text after span element using jquery
- Prevent redirect after form is submitted
- How do I auto-hide placeholder text upon focus using css or jquery?
- JQuery post JSON object to a server
- Set value of hidden field in a form using jQuery’s “.val()” doesn’t work
- CORS with jQuery and XDomainRequest in IE8/9
- What CSS3 selectors does jQuery really support, e.g. :nth-last-child()?
- auto resize text (font size) when resizing window?
- Where is the typeahead JavaScript module in Bootstrap 3 RC 1?
- How to select an element that has focus on it with jQuery
- What are the typical reasons Javascript developed on Firefox fails on IE? [closed]
- How to handle change of checkbox using jQuery?
- Is there a way to prevent overlapping events in jQuery FullCalendar?
- Find all elements based on ids using regex on jQuery selector
- jQuery: How to get the value of an html attribute?
- How to force a hover state with jQuery?
- JqGrid Filter Rules – Can we filter based on an Array?
- How can I remove the search bar and footer added by the jQuery DataTables plugin?
- jQuery .get error response function?
- jQuery ajax and SSL?
- CSS3 equivalent to jQuery slideUp and slideDown?
- How to exclude an element from being dragged in sortable list?
- how to fetch array keys with jQuery?
- Uncaught TypeError: Object [object Object] has no method ‘dialog’
- jQuery validate plugin : accept letters only?