Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
ee0175c4
Commit
ee0175c4
authored
Jan 10, 2007
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added back in height and width - they now behave more appropriately.
parent
62303ad5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
jquery.js
src/jquery/jquery.js
+68
-0
No files found.
src/jquery/jquery.js
View file @
ee0175c4
...
@@ -2109,3 +2109,71 @@ jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){
...
@@ -2109,3 +2109,71 @@ jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){
return
this
.
filter
(
":"
+
n
+
"("
+
num
+
")"
,
fn
);
return
this
.
filter
(
":"
+
n
+
"("
+
num
+
")"
,
fn
);
};
};
});
});
/**
* Get the current computed, pixel, width of the first matched element.
*
* @example $("p").width();
* @before <p>This is just a test.</p>
* @result 300
*
* @name width
* @type String
* @cat CSS
*/
/**
* Set the CSS width of every matched element. If no explicit unit
* was specified (like 'em' or '%') then "px" is added to the width.
*
* @example $("p").width(20);
* @before <p>This is just a test.</p>
* @result <p style="width:20px;">This is just a test.</p>
*
* @example $("p").width("20em");
* @before <p>This is just a test.</p>
* @result <p style="width:20em;">This is just a test.</p>
*
* @name width
* @type jQuery
* @param Number|String val Set the CSS property to the specified value.
* @cat CSS
*/
/**
* Get the current computed, pixel, height of the first matched element.
*
* @example $("p").height();
* @before <p>This is just a test.</p>
* @result 300
*
* @name height
* @type String
* @cat CSS
*/
/**
* Set the CSS width of every matched element. If no explicit unit
* was specified (like 'em' or '%') then "px" is added to the width.
*
* @example $("p").height(20);
* @before <p>This is just a test.</p>
* @result <p style="height:20px;">This is just a test.</p>
*
* @example $("p").height("20em");
* @before <p>This is just a test.</p>
* @result <p style="height:20em;">This is just a test.</p>
*
* @name height
* @type jQuery
* @param Number|String val Set the CSS property to the specified value.
* @cat CSS
*/
jQuery
.
each
(
[
"height"
,
"width"
],
function
(
i
,
n
){
jQuery
.
fn
[
n
]
=
function
(
h
)
{
return
h
==
undefined
?
(
this
.
length
?
jQuery
.
css
(
this
[
0
],
n
)
:
null
)
:
this
.
css
(
n
,
h
.
constructor
==
String
?
h
:
h
+
"px"
);
};
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment