Using the width function:
$('div#somediv').width('70%');
will turn:
<div id="somediv" />
into:
<div id="somediv" style="width: 70%;"/>
More Related Contents:
- jQuery – Get Width of Element when Not Visible (Display: None)
- How to adjust the column width of jqgrid AFTER the data is loaded?
- How to get screen width without (minus) scrollbar?
- Is it possible to use jQuery to get the width of an element in percent or pixels, based on what the developer specified with CSS?
- Getting the actual, floating-point width of an element
- Can I open a dropdownlist using jQuery
- Get element -moz-transform:rotate value in jQuery
- Play/pause HTML 5 video using JQuery
- What is the easiest way to order a / in jQuery?
- ASP.net MVC 3 jQuery Validation; Disable Unobtrusive OnKeyUp?
- How to strip HTML tags with jQuery?
- Show Div when scroll position
- JQuery sortable lists and fixed/locked items
- Opening tab with anchor link
- jQuery to serialize only elements within a div
- jQuery – get AJAX response headers
- Changing the action of a form with JavaScript/jQuery
- What do dot and hash symbols mean in JQuery?
- JQuery: detect change in input field [duplicate]
- How to programmatically trigger the click on a link using jQuery?
- jquery client side validation not working in MVC3 partial view
- jquery reading nested json
- Remove CSS “top” and “left” attributes with jQuery
- jQuery: using a variable as a selector [duplicate]
- jQuery detect click on disabled submit button
- jquery validation not waiting for remote validation to return true, considers form valid
- Selecting a jQuery Tab using a parameter in the URL
- Using jQuery’s $.ajax within an angularJS controller
- Listen to changes within a DIV and act accordingly
- Load JQuery into a Chrome extension?