explain width() vs css(‘width’) in jquery
Answer / Dharmendra Kumar Mourya
[n {n "method": ".width",n "description": "Returns the width of an element, in pixels. The value includes padding but not border or margin.n ",n "example": "n $('div').width(); // Returns the width of the first div on the page in pixels"n },n {n "method": "css('width')",n "description": "Returns or sets the CSS property value for the specified style. In this case, 'width'.n ",n "example": "n $('div').css('width', '200px'); // Sets the width of the first div on the page to 200 pixelsn $('div').css('width'); // Returns the CSS 'width' value for the first div on the page"n }n]
| Is This Answer Correct ? | 0 Yes | 0 No |
How to divide a page into parts using jquery mobile? : jquery mobile
Is jQuery a library for client scripting or server scripting?
What are the browser related issues for jQuery?
What is the difference between $('div') and $('<div/>') in jQuery?
Do we need to add the jquery file both at the master page and content page as well?
How to get the server response from an ajax request using jquery?
What happen if you return false from a jQuery event handler?
Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?
How can you add a jquery library in your project?
How to get/set the html contents of an element using jQuery?
What programming language does jquery use?
How to programmatically trigger a click event thats being handled by jquery only?