Maintaining Width of multi-picklist on visualforce page in Salesforce

Use following javascript code


$(document).ready(function(){
$("[id*='_unselected']").dblclick(function(){
setTimeout(function() {
$("[id*='_unselected']").removeAttr('style');
$("[id*='_selected']").removeAttr('style');
}, 100);
});
$("[id*='_selected']").dblclick(function(){
setTimeout(function() {
$("[id*='_unselected']").removeAttr('style');
$("[id*='_selected']").removeAttr('style');
}, 100);
});
$("[title='Add']").click(function(){
setTimeout(function() {
$("[id*='_unselected']").removeAttr('style');
$("[id*='_selected']").removeAttr('style');
}, 100);
});
$("[title='Remove']").click(function(){
setTimeout(function() {
$("[id*='_unselected']").removeAttr('style');
$("[id*='_selected']").removeAttr('style');
}, 100);
});
});

Published by Sandeep Kumar

He is a Salesforce Certified Application Architect having 11+ years of experience in Salesforce.

Leave a Reply