css - Jquery change width of div -


i want change width of elements rendered using following code. have tried adding style width:xxpx element in definition , try defining new css class invail. want both containers under main container of same size. following code rendering approximately 40-60. using style sheets jquery ui(jquery-ui-1.7.1.custom.css).

 this.container = $('<div class="ui-multiselect ui-helper-clearfix ui-widget" ></div>').insertafter(this.element);  this.availablecontainer = $('<div class="ui-widget-content list-container available"></div>').appendto(this.container);  this.selectedcontainer = $('<div class="ui-widget-content list-container selected"></div>').appendto(this.container); 

help?

var newwidth = this.container.width() / 2;    //i assume want child divs half size of parent? this.availablecontainer.width(newwidth); this.selectedcontainer.width(newwidth); 

this how asked, change width of divs jquery.

you should keep bashing away @ css , try , styles set stylesheet if website/app expected function without javascript.

link working example: http://jsfiddle.net/phu6y/5/


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -