I want to add a margin-left and margin-right to this element. Can anybody help me with that?
this.$list.css( 'width', 100 * this.itemsCount + '%' );
I want to add a margin-left and margin-right to this element. Can anybody help me with that?
this.$list.css( 'width', 100 * this.itemsCount + '%' );
I assume this should be a jquery question, but...
css() can take a object as a parameter, so try...
this.$list.css({
'width': 100 * this.itemsCount + '%',
'margin-left': '10px',
'margin-right': '10px'
});