html - Manipulating div size using jquery -
i'm trying change size of div 99% of original size in jquery.
i'm using following code width:
var textwidth = $('.comment-holder').css('width');
this outputs value of 400px
so how can set width of div new value, 99% of original (of 400px)?
it easier use .width()
rather .css('width')
returns number. following should work:
var $e = $('.comment-holder'), width = $e.width(); $e.width(width * 0.99);
one problem this, override css widths such '90%' or '10em' , therefore stop automatic scaling , re-sizing.
Comments
Post a Comment