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
82e0a5a8
Commit
82e0a5a8
authored
Jul 30, 2006
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed two bugs with togglling.
parent
879225b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
event.js
event/event.js
+1
-1
fx.js
fx/fx.js
+4
-4
jquery.js
jquery/jquery.js
+6
-6
No files found.
event/event.js
View file @
82e0a5a8
...
@@ -2,7 +2,7 @@ jQuery.fn.extend({
...
@@ -2,7 +2,7 @@ jQuery.fn.extend({
// We're overriding the old toggle function, so
// We're overriding the old toggle function, so
// remember it for later
// remember it for later
_toggle
:
jQuery
.
fn
.
toggle
,
//
_toggle: jQuery.fn.toggle,
/**
/**
* Toggle between two function calls every other click.
* Toggle between two function calls every other click.
...
...
fx/fx.js
View file @
82e0a5a8
jQuery
.
fn
.
extend
({
jQuery
.
fn
.
extend
({
// overwrite the old show method
// overwrite the old show method
_show
:
jQuery
.
fn
.
show
,
//
_show: jQuery.fn.show,
/**
/**
* Show all matched elements using a graceful animation.
* Show all matched elements using a graceful animation.
...
@@ -37,7 +37,7 @@ jQuery.fn.extend({
...
@@ -37,7 +37,7 @@ jQuery.fn.extend({
},
},
// Overwrite the old hide method
// Overwrite the old hide method
_hide
:
jQuery
.
fn
.
hide
,
//
_hide: jQuery.fn.hide,
/**
/**
* Hide all matched elements using a graceful animation.
* Hide all matched elements using a graceful animation.
...
@@ -440,8 +440,8 @@ jQuery.extend({
...
@@ -440,8 +440,8 @@ jQuery.extend({
z
.
el
.
oldOverflow
=
jQuery
.
css
(
z
.
el
,
"overflow"
);
z
.
el
.
oldOverflow
=
jQuery
.
css
(
z
.
el
,
"overflow"
);
// Make sure that nothing sneaks out
// Make sure that nothing sneaks out
if
(
z
.
el
.
oldOverlay
==
"visible"
)
//
if ( z.el.oldOverlay == "visible" )
y
.
overflow
=
"hidden"
;
y
.
overflow
=
"hidden"
;
// Each step of an animation
// Each step of an animation
z
.
step
=
function
(
firstNum
,
lastNum
){
z
.
step
=
function
(
firstNum
,
lastNum
){
...
...
jquery/jquery.js
View file @
82e0a5a8
...
@@ -748,8 +748,8 @@ jQuery.extend({
...
@@ -748,8 +748,8 @@ jQuery.extend({
jQuery
.
fn
[
i
]
=
function
(){
jQuery
.
fn
[
i
]
=
function
(){
var
a
=
arguments
;
var
a
=
arguments
;
return
this
.
each
(
function
(){
return
this
.
each
(
function
(){
for
(
var
i
=
0
;
i
<
a
.
length
;
i
++
)
for
(
var
j
=
0
;
j
<
a
.
length
;
j
++
)
$
(
a
[
i
])[
n
](
this
);
$
(
a
[
j
])[
n
](
this
);
});
});
};
};
});
});
...
@@ -2137,7 +2137,7 @@ jQuery.macros = {
...
@@ -2137,7 +2137,7 @@ jQuery.macros = {
* @name show
* @name show
* @type jQuery
* @type jQuery
*/
*/
show
:
function
(){
_
show
:
function
(){
this
.
style
.
display
=
this
.
oldblock
?
this
.
oldblock
:
""
;
this
.
style
.
display
=
this
.
oldblock
?
this
.
oldblock
:
""
;
if
(
jQuery
.
css
(
this
,
"display"
)
==
"none"
)
if
(
jQuery
.
css
(
this
,
"display"
)
==
"none"
)
this
.
style
.
display
=
"block"
;
this
.
style
.
display
=
"block"
;
...
@@ -2153,7 +2153,7 @@ jQuery.macros = {
...
@@ -2153,7 +2153,7 @@ jQuery.macros = {
* @name hide
* @name hide
* @type jQuery
* @type jQuery
*/
*/
hide
:
function
(){
_
hide
:
function
(){
this
.
oldblock
=
this
.
oldblock
||
jQuery
.
css
(
this
,
"display"
);
this
.
oldblock
=
this
.
oldblock
||
jQuery
.
css
(
this
,
"display"
);
if
(
this
.
oldblock
==
"none"
)
if
(
this
.
oldblock
==
"none"
)
this
.
oldblock
=
"block"
;
this
.
oldblock
=
"block"
;
...
@@ -2172,7 +2172,7 @@ jQuery.macros = {
...
@@ -2172,7 +2172,7 @@ jQuery.macros = {
* @name toggle
* @name toggle
* @type jQuery
* @type jQuery
*/
*/
toggle
:
function
(){
_
toggle
:
function
(){
var
d
=
jQuery
.
css
(
this
,
"display"
);
var
d
=
jQuery
.
css
(
this
,
"display"
);
$
(
this
)[
!
d
||
d
==
"none"
?
"show"
:
"hide"
]();
$
(
this
)[
!
d
||
d
==
"none"
?
"show"
:
"hide"
]();
},
},
...
@@ -2335,4 +2335,4 @@ jQuery.macros = {
...
@@ -2335,4 +2335,4 @@ jQuery.macros = {
jQuery
.
event
.
trigger
(
type
,
data
,
this
);
jQuery
.
event
.
trigger
(
type
,
data
,
this
);
}
}
}
}
};
};
\ No newline at end of file
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